cell qualifier if statement

hitch_hiker

Active Member
Joined
Feb 21, 2012
Messages
294
G'day,
I normally use a cell qualifier =if(a3,"yes",2) this is simplified, usually the "yes" component will be a function, the purpose of this is to tidy up the display, only if data exists in cell a3 will the cell display the result of a function, this removes the unsightly column of "0" in a display sheet, typically this would be copied down to the end of the range, this system has worked for me for many spreadsheets over many years and many versions of excel. In fact one workbook I use every day has =IF(C10,VLOOKUP('ORDER INPUT'!C10,'product list'!B:M,5,FALSE),"") and it works a charm, but when I type the qualifier in I get #value if true and "2" if the cell is empty, any suggestions as to what I'm doing wrong, I'm using office 365
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I am not sure if this is all about but you are checking the empty cell in a deficient way. Try:

=IF(TRIM(A1)<>"","yes",2)
 
Upvote 0
I am not sure if this is all about but you are checking the empty cell in a deficient way. Try:

=IF(TRIM(A1)<>"","yes",2)

Thanks Flashbond,
It worked a treat, though I'm still at a loss as to why the cell qualifier I have always used was returning an error, and for that matter why yours worked, I thought the trim function in this case was just making it more complicated.
 
Upvote 0
Thanks for your help
I'd mark your reply with a thanks and a like except I have no idea how to do that

It's at the lower left corner of the post you want to "Thank" and/or "Like", just click on them.
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top