Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Is it possible, without VBA, to test the emptiness of a cell? For example,
a formula that will return 1 if a cell is unused (has nothing in it), 2 if the cell has a formula returning a null string: =IF(1=1,,) 3 if the cell has a single quote in it and 4 otherwise? -- Gary''s Student - gsnu2007xx |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thu, 7 Feb 2008 06:51:04 -0800, Gary''s Student
wrote: Is it possible, without VBA, to test the emptiness of a cell? For example, a formula that will return 1 if a cell is unused (has nothing in it), 2 if the cell has a formula returning a null string: =IF(1=1,,) 3 if the cell has a single quote in it and 4 otherwise? =IF(ISBLANK(A1),1,IF(LEN(A1)=0,2,IF(NOT(ISERR(FIND ("'",A1))),3,4))) Of course, this is testing for the presence of a single quote -- NOT for the use of a single quote to tell Excel to format the rest of the entry as TEXT. --ron |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thu, 7 Feb 2008 06:51:04 -0800, Gary''s Student
wrote: Is it possible, without VBA, to test the emptiness of a cell? For example, a formula that will return 1 if a cell is unused (has nothing in it), 2 if the cell has a formula returning a null string: =IF(1=1,,) 3 if the cell has a single quote in it and 4 otherwise? Something like: =IF(ISBLANK(A1),1,IF(AND(LEN(A1)=0,CELL("prefix",A 1)="'"),3,IF(LEN(A1)=0,2,4))) detects if the single quote is present by itself and as a prefix character. But you really didn't specify that. --ron |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Excellent!!!
This is exactly what I need! -- Gary''s Student - gsnu200767 "Ron Rosenfeld" wrote: On Thu, 7 Feb 2008 06:51:04 -0800, Gary''s Student wrote: Is it possible, without VBA, to test the emptiness of a cell? For example, a formula that will return 1 if a cell is unused (has nothing in it), 2 if the cell has a formula returning a null string: =IF(1=1,,) 3 if the cell has a single quote in it and 4 otherwise? Something like: =IF(ISBLANK(A1),1,IF(AND(LEN(A1)=0,CELL("prefix",A 1)="'"),3,IF(LEN(A1)=0,2,4))) detects if the single quote is present by itself and as a prefix character. But you really didn't specify that. --ron |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thu, 7 Feb 2008 07:24:00 -0800, Gary''s Student
wrote: Excellent!!! This is exactly what I need! -- Gary''s Student - gsnu200767 Glad to help. Thanks for the feedback. --ron |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
try this logic to get to the last one
=trim(a1) =len(trim(a1)) =if(len(trim(a1))<1,1,2) -- Don Guillett Microsoft MVP Excel SalesAid Software "Gary''s Student" wrote in message ... Is it possible, without VBA, to test the emptiness of a cell? For example, a formula that will return 1 if a cell is unused (has nothing in it), 2 if the cell has a formula returning a null string: =IF(1=1,,) 3 if the cell has a single quote in it and 4 otherwise? -- Gary''s Student - gsnu2007xx |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
thanks
-- Gary''s Student - gsnu200768 "Don Guillett" wrote: try this logic to get to the last one =trim(a1) =len(trim(a1)) =if(len(trim(a1))<1,1,2) -- Don Guillett Microsoft MVP Excel SalesAid Software "Gary''s Student" wrote in message ... Is it possible, without VBA, to test the emptiness of a cell? For example, a formula that will return 1 if a cell is unused (has nothing in it), 2 if the cell has a formula returning a null string: =IF(1=1,,) 3 if the cell has a single quote in it and 4 otherwise? -- Gary''s Student - gsnu2007xx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clipboard empty but get cannot empty CB when trying to copy | Excel Worksheet Functions | |||
why a reference to an empty cell is not considered empty | Excel Discussion (Misc queries) | |||
in excel..:can't empty clip are" but already empty | Excel Discussion (Misc queries) | |||
Excel - Autom. Filter "Empty / Non Empty cells" should come first | Excel Discussion (Misc queries) | |||
How can I convert empty strings to empty cells? | Excel Discussion (Misc queries) |