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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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

Forum statistics

Threads
1,223,977
Messages
6,175,753
Members
452,667
Latest member
vanessavalentino83

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