andyandy12345
New Member
- Joined
- Feb 26, 2011
- Messages
- 11
I am trying unsuccessfully to work through a range where I need two conditions to be met and to output result that has to be looked up. In Excel the formula would look something like this "=IF(AND(X2<>"text", G2<>24),4,"x") - but this is limited for my requirements.
The value in x2 will be 1 of two possible text strings (eg text 1 or text 2)and the vaule in g2 will be 1 of 4 possible integers (eg 4,8,16,24) and I am trying to get the combination of x2 and g2 to output a values from a defined list
so if x2 = "text 1" and g2 = "24" then lookup/match to a list (i have tried using arrays, and can create them but cannot tap into using the stored values) and output an integer (possible results = 4 for each text strings)
Sorry if this is not clear but this explanation may indicate that I do not think logically enough to work out the vba..!
TIA
The value in x2 will be 1 of two possible text strings (eg text 1 or text 2)and the vaule in g2 will be 1 of 4 possible integers (eg 4,8,16,24) and I am trying to get the combination of x2 and g2 to output a values from a defined list
so if x2 = "text 1" and g2 = "24" then lookup/match to a list (i have tried using arrays, and can create them but cannot tap into using the stored values) and output an integer (possible results = 4 for each text strings)
Sorry if this is not clear but this explanation may indicate that I do not think logically enough to work out the vba..!
TIA