Make Formula SHORTER

TiggerToo

Board Regular
Joined
Feb 26, 2002
Messages
158
I need this formula shorter and simpler.

=if(c6=11,"",if(c6=0,"",vlookup(c6,dutycode!$a$4:$d$14,4,)))

column/row c6 has the code 11,
but if a "0" is put in place of 11, "#N/A" will appear. So I added, if c6=0,"" will make "#N/A" disappear.
Is there an easier way if c6 is blank or a "0" is place in c6.
I saw a posting someplace like =if(a1=11,a1=0,e4) I think it is an IF(or( type statement.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi

Don't confuse shorter with better or more effiecient, often not the case. But here are 2 more options.

=IF(OR(C6=11,C6=0),"",VLOOKUP(C6,dutycode!$A$4:$D$14,4,))


=IF(COUNTIF(dutycode!$A$4:$A$14,C6)=0,"",VLOOKUP(C6,dutycode!$A$4:$D$14,4))


I alos note you haven't used False as the Range_lookup argument, you may want to change that?
 
Upvote 0
Hi

Don't confuse shorter with better or more effiecient, often not the case. But here are 2 more options.

=IF(OR(C6=11,C6=0),"",VLOOKUP(C6,dutycode!$A$4:$D$14,4,))


=IF(COUNTIF(dutycode!$A$4:$A$14,C6)=0,"",VLOOKUP(C6,dutycode!$A$4:$D$14,4))


I also note you haven't used False as the Range_lookup argument, you may want to change that?
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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