Exact number of digits in a cell

Sorry to post simple question in this forum but I need to use a function key 
to check if the correct number of digits are in a cell.  I presume it would 
work such as 6 digits entered True, 4 or 7 False.  I have tried a number of 
books but am struggling a little.  Help very much appreciated.

Roger 


0
3/1/2008 2:13:15 PM
excel 39879 articles. 2 followers. Follow

1 Replies
474 Views

Similar Articles

[PageSpeed] 17

You can use the len function to return the # of characters in a cell.
i.e. =if(len(a1)<>6,"You entered the wrong # of characters","You
entered the right # of characters") ----does the following if a1 does
not equal 6, says you entered the wrong # otherwise says you entered
the right number


depending on your needs you can also use data validation (go to Data->
Validation) accomplish this.


On Mar 1, 9:13 am, "roger lewis" <rogerle...@ntlworld.com> wrote:
> Sorry to post simple question in this forum but I need to use a function key
> to check if the correct number of digits are in a cell.  I presume it would
> work such as 6 digits entered True, 4 or 7 False.  I have tried a number of
> books but am struggling a little.  Help very much appreciated.
>
> Roger

0
tim879 (14)
3/1/2008 2:25:46 PM
Reply:

Similar Artilces:

Format a cell as seconds
Is there a way to format cells to appear as seconds. I would like to type 7 and have it generate a 0:00:07. I know that I could use the TIME function for this, but I would need two cells for that. I want to format the cell I'm working in. Thanks! Hi have a look at http://www.cpearson.com/excel/DateTimeEntry.htm -- Regards Frank Kabel Frankfurt, Germany Lisa wrote: > Is there a way to format cells to appear as seconds. I > would like to type 7 and have it generate a 0:00:07. I > know that I could use the TIME function for this, but I > would need two cells for tha...

use arrow keys to tab to specific cells
I was able to use my arrow keys to tab to specific cells, now it moves the entire worksheet instead. How to I enable my arrow keys to move to cells? Hi, On the keyboard tap 'Scroll Lock' key. Mike "mary ellen" wrote: > I was able to use my arrow keys to tab to specific cells, now it moves the > entire worksheet instead. How to I enable my arrow keys to move to cells? SCROLL lock is ON. (Key near to Print Screen in your keyboard) Turn it OFF -- Jacob "mary ellen" wrote: > I was able to use my arrow keys to tab to specific c...

Excel 97
I have 2 different pivot tables, each with a total. If I select both totals using Office 2003, the SUM of the 2 cells appears in the bottom right of the spreadsheet. If I try to select the same 2 cells using Office 97, nothing happens and the cells are not selected. Can anyone confirm whether or not this function is only available with Office 2000 or later? ...

How do i add the squared symbol to a number
How do i add the squared symbol to a number One way to produce the exponent 2 is to hold the Alt key down while pressing 0178 (on the number keypad, not the top row of your keyboard). Steve "mike" <mike@discussions.microsoft.com> wrote in message news:04FAB714-FE0C-410E-AC46-EF47F2C6AC9D@microsoft.com... > How do i add the squared symbol to a number Do you want to square the number ? [ num^2 will square the number] do you want to show that a number is squared in a text line? enter the number with the 2 right after it. Select the 2 and <format><cell> ...

telephone number field mask
I have a field I use for telephone numbers. I would like the mask to return data like this : 111 111 1111. What is the formula for this? Any help is appreciated. Mtn244: Thanks much for assistance. I tried your mask with great success. All is good in River City. Thanks again for your help. Frank "mtn244" <mtn244@discussions.microsoft.com> wrote in message news:82895481-BC0D-4FB7-A9A8-1649395C1224@microsoft.com... > Try this input mask: > !999 000 0000;0; > > "Frank" wrote: > >> I have a field I use for telephone numbers. I would lik...

VBA/Row number/column numer
If I want to specify a cell in VBA but only know it's row NUMBer and not column number, how would I describe this cell in vba? i.e. instead of AA5, i want to be able to talkb about it as being column 27 and row 5... thanks! Mika, Cells(Row, Column) Cells(2, 3) would give you cell C2 -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "mika." <conceptualness@hotmail.com> wrote in message news:07ad01c37be7$ffd1b0a0$a101280a@phx.gbl... > If I want to specify a cell in VBA but only know it's row > NUMBer a...

excel copy cells to word template
I have a large workbook and I want to copy cells from one sheet called Menu to a specific word template called PDC_MCC_IR.dot and save the word template as a word document. I have a bit of code that can open a word document and past information from cells in the word document but I need help for the rest. Can anyone help me. Here is the code that I already have. Sub Excel_to_Word() Dim appWord As Word.Application Set appWord = New Word.Application appWord.Visible = True Range("b4:c10").Copy appWord.Documents.Add.Content.Paste Application.CutCopyMode ...

Print ascending number on multiple printed cpoies
I am using Excel to print labels on a Thermal label printer (a roll of labels). If I print out say 10 copies I want each label to print out in a certain cell the copy number starting from 1 on the first label to 10 on the tenth label. How can I do this? -- cbwood ------------------------------------------------------------------------ cbwood's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=23735 View this thread: http://www.excelforum.com/showthread.php?threadid=374086 ...

Last Cell
Is there a way to change the which cell Excel tracks as the last cell? Thanks! Hi not quite sure what you'e looking for?. If you have to re-set the used range try http://www.contextures.com/xlfaqApp.html#Unused -- Regards Frank Kabel Frankfurt, Germany Allison wrote: > Is there a way to change the which cell Excel tracks as > the last cell? Thanks! >-----Original Message----- >Hi >not quite sure what you'e looking for?. If you have to re- set the used >range try >http://www.contextures.com/xlfaqApp.html#Unused > >-- >Regards >Frank Kabel >F...

How to combine cells into one
I am trying to map a product list to a template for their my website ecommerce app. my product fields don't match up exactly with the website so in some cases I need to consolidate fields. I would like take some columns and combine them into one.. but instead of taking 1,2,3 into 123 I want to add some text and stuff in between... ie, some of the columns I have are measurements so the numbers alone might be meaning less. I'm not really excel savvy but I tried =B2&othercolumns, but the problem with this is there are no spaces. I tried adding spaces before and or a...

How to number shapes
If I want to number shapes on page 1 with 1.1, 1.2, 1.3... and on page 2 start with 2.1, 2.2, 2.3... I try Number Shapes Add-on but only numbering start with 1 is provided, why? Actually, you CAN select 1. , 2. , etc as preceeding text with the Number Shapes Add-on. "Angus" <Angus@discussions.microsoft.com> wrote in message news:087C379C-205F-4201-8691-41F004D650BF@microsoft.com... > If I want to number shapes on page 1 with 1.1, 1.2, 1.3... and on page 2 > start with 2.1, 2.2, 2.3... > > I try Number Shapes Add-on but only numbering start with 1 is provided, ...

active cell status disappears ??
If I leave the cursor in say C5, and come back to the computer a minute or so later, the Name box shows C5 as the active cell, but the cell isn't referenced anymore ... in other words, it's not "framed" showing that's where the cursor is ... I have to physically click the mouse in a cell to get the "frame" to come back ... This just started happening a week or so ago, on my work computer ... I don't know is someone else might have downloaded a virus or changed the settings ... Help ...??? When Excel itself loses focus (is no longer the active applic...

Port number
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C51EC9.F5678870 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable One of my frineds is able to use the Microsoft Office Outlook Live fine = from his house. When he goes to his office and accesses it, he is = getting an error message 0x80040126 while trying to send and receive = emails in MOOL. The only reason why this could happen that i can think = of is the firewall. Is there any other reason why this could not work = fine? Is there somebody here who knows about the...

How can I sum non-consecutive numbers in a column?
Any ideas would be greatly appreciated. its driving me crazy summing large numbers of non-consecutive cells. Maybe try this .. Suppose you want to sum in say A2, the numbers in A4:A5 A7:A14 A19:A24 A26 A28 Enter in A2: =SUM( Hold down the CTRL key Now just click to select A4:A5 A7:A14 A19:A24 A26 A28 Type a closing parens, press Enter You'll get in A2: =SUM(A4:A5,A7:A14,A19:A24,A26,A28) -- Rgds Max xl 97 --- Please respond in thread xdemechanik <at>yahoo<dot>com ---- "Elwood" <Elwood@discussions.microsoft.com> wrote in message news:7708F6C1-637A-47EC-B...

Seperating cells and columns
Is there a way to seperate some cells and/or columns so you could have different height cells/columns that are in the same row? thx, Dave -- DRLski ------------------------------------------------------------------------ DRLski's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=26892 View this thread: http://www.excelforum.com/showthread.php?threadid=401166 inserts some rows above and below your initial row and merge the ones that need to be higher with cells above and/or below -- Dnereb -------------------------------------------------------------------...

conditional formatting, empty cells
Hi faced to the following problem: Let us asssume that i want to c fin all values in column A with range 3 to 9 and make them red. Everything goes fine when I select the whole column, go to th conditional formatting and use the system: if cell value is not betwee 0-9 make the cell red. The blank cells are not colored BUT: when I use the same system with values between 3-9, the empt cells are colored to red and system is not working. Can anyone explain why this system is working from 0 to eternity an not from 1 to eternity.. -- Message posted from http://www.ExcelForum.com Hi are these ce...

Cell display in 2007
After revising a formula in Excel 2007, the new number is presented overlaid on top of the previous number in the cell. If I minimize EXCEL and then then maximize, the cell data presents correctly. Formula, Calculation Options is set to Automatic. The size of the spreadsheet/file does not matter. I've only had EXCEL 2007 a few weeks and my PC is new. Our IT shop has changed PC's virtual memory to 5120-8192 with no improvement. There have been reports of a bug in a windows update for office 2007 November 10th Can cause "visual leaking" from one sheet to an...

Seperate two words in a cell
I have a column heading called "Name". Each cell in this column contains the first and the last name. What formula can I use (in 2 new columns called FName and SName) to separate the first name from the last name. Hi, Gary. Use Text to Columns, about 1/3rd the way down this page: http://www.officearticles.com/tutorials/an_extreme_tutorial_in_microsoft_excel.htm ******************* ~Anne Troy www.OfficeArticles.com "Gary" <g45340@hotmail.com> wrote in message news:42de4c57$0$8417$afc38c87@news.optusnet.com.au... > I have a column heading called "Name&qu...

Digitally signed messages
I am running Windows Vista. I just installed Windows Live Mail and it automatically imported all my mail messages from Windows Mail. But every email message I had received under Windows Mail with a digital signature now does not display -- and I get the error: Message could not be displayed Windows Live Mail encountered an unexpected problem while displaying this message. Check your computer for low memory or low disk space and try again. I did not have this problem with Windows Mail -- so am I missing some setting? ...

Word Numbering (word 2003) AAARRRGGGHHH
I have a document from a coworker- its a disaster in terms of numbering. Word 2003 is hard enough to get the 1.0, 1.1, 1.2. 1.2.1 1.2.2 1.3 2.0 2.1 etc to work decently- it has a mind of its own- lets say you put a bullet list under 6.1, when I return to the text- I start getting 1.1, etc. Is there a way to get numbering to behave. I can never remember a time where numbering has EVER bahaved for me. Its always been a situation where the more people editing a document, the worse it seems to get in terms of trying to get a documen...

How can I convert empty strings to empty cells?
Hi there. Hopefully someone can help with something that seems pretty strange. I'm exporting data from access to excel and doing some stuff to the data with pivot tables. In the pivot tables however, blank cells don't register as 'blank' unless I manually go into each cell and hit delete (even though there seems to be nothing there to delete). Here's an example of before: Count of QualityChecked QualityChecked Total (blank) 4 Yes 6 Grand Total 10 and after I delete the data in the seemingly blank cells: Count of QualityChecked QualityChecke...

Importing or opening a set of email addresses so that they are in vertical cells
When I do it now by copying a set of emails on my outlook address bar and past it into excel they are all in one cell. HELP HOW SHOULD I DO THAT? Thanks Hi Use File/Import Export from Outlook and choose 'Excel file' as type. Andy. "Felix" <felix@feacinstitute.org> wrote in message news:1143044573.798729.163680@i39g2000cwa.googlegroups.com... > When I do it now by copying a set of emails on my outlook address bar > and past it into excel they are all in one cell. > HELP HOW SHOULD I DO THAT? > Thanks > Andy thanks, but what I need is: I have a w...

Unique number
I need to make sure a number is not entered more than once in a column. This is a sheet for taking orders, hence the need to have unique numbers. Any help would be appreciated. thanks, Mike Hi Mike check out Chip Pearson's web site http://www.cpearson.com/excel/NoDupEntry.htm he's got a section there on ensuring that duplicate information isn't entered in a column. Cheers JulieD "Mike W" <mike@ehb-docks.fsbusiness.co.uk> wrote in message news:cgcu9c$a6t$1@newsg3.svr.pol.co.uk... > I need to make sure a number is not entered more than once in a column. &...

Placing query results in a cell
I have a project where I can connect to a database, construct a query within a VBA module: mysql01 = " select ChildID, ChildName " mysql02 = " from tblChild " Now suppose I want to put the results of the query anywhere in the spreadhseet, i.e. in a specific cell. How do I do that? On Nov 26, 4:55=A0pm, Tangier <nitinhemm...@gmail.com> wrote: > I have a project where I can connect to a database, construct a query > within a VBA module: > > mysql01 =3D " select ChildID, ChildName " > mysql02 =3D " from tblChild " > > Now suppo...

How to ckeck if a text is larger than the cell ?
Hello. How, by programming, can I check if a text in a cell is too large, and therefore will not be fully displayed ? In order to reduce the font size only when needed. Thank you, Gilbert On Mon, 22 Sep 2008 09:18:38 +0200, "Gilbert Tordeur" <gilbert.tordeur@orange.fr> wrote: >Hello. > >How, by programming, can I check if a text in a cell is too large, and >therefore will not be fully displayed ? In order to reduce the font size >only when needed. In the Alignment tab, there's a Shrink to Fit option. Would that do it? ...