Gift2women
New Member
- Joined
- Jun 25, 2005
- Messages
- 33
Without using a macro, does Excel have a better way to do the following:
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.
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))),"")
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.