Just make the formula shorter

rplim2016

Board Regular
Joined
Jun 28, 2016
Messages
76
Hi Mr. Excel,

Is there a way NOT to REPEAT the logical_test false statement again, as I wanted the formula to be just shorter.


Example:

from:
=IF(VLOOKUP(D2,Criteria!$C$2:$D$11,2,0)="123",1,
VLOOKUP(D2,Criteria!$C$2:$D$11,2,0))


to:
=IF(VLOOKUP(D2,Criteria!$C$2:$D$11,2,0)="123",1,
some shortcut formula to put the logical_test here to make the words shorter, because logical_test sometimes can be much longer)



Thanks
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hello,

You could test following :

Code:
=SUBSTITUTE([COLOR=#333333]VLOOKUP(D2,Criteria!$C$2:$D$11,2,0)="123",1)[/COLOR]

Hope this will help
 
Upvote 0
You could put the Vlookup in a helper column & then point the If to that column
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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