Formula similar to SQL ISNULL (non-macro), is there an easier way?

Gift2women

New Member
Joined
Jun 25, 2005
Messages
33
Without using a macro, does Excel have a better way to do the following:
Code:
=IF(LEN($A2)>0, IF(ISBLANK(INDEX('092016'!$P:$P, MATCH($A2, '092016'!$A:$A,0))), "", INDEX('092016'!$P:$P, MATCH($A2, '092016'!$A:$A,0))),"")
In SQL, for instance there is an ISNULL that only translates the value if it is NULL, does excel have that option? Something to say if the value is Blank/Null, do X, otherwise return that non-null value? Above, is a simplified version of what I sometimes have to write.
1. If A2 has a value do something: perfect
2. If the value of the INDEX-MATCH is Blank, return "": again, pretty perfect
3. If the value of the INDEX-MATCH is not Blank, return value: that value is the result of the SAME INDEX-MATCH, so I'm typing/copying the INDEX-MATCH twice per line, is there any way to do the same thing without having to return the value twice?

For SQL, lets assume I have Column1 with Row1 = 25 and Row2 = NULL;
ISNULL(Column1, 0) = 25 for Row1, and 0 for Row2 ... I only want to have to define the return once.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I'm not entirely sure I have all the details, but you might want to try this:

=IFERROR(INDEX('092016'!$P:$P, MATCH($A2, '092016'!$A:$A,0)),"")&""
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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