If or not calculating

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
In my worksheet, A1=SCRN

In G1:H4 I have a lookup table:

G2=SC, H2=Credit
G3=GL, H3=Payment
G4=SL, H4=Sale

In E1 I'm have a formula that will lookup the first 2 characters of column A in the lookup table. My formula is:

=IF(OR(LEFT(A1,1)="S",LEFT(A1,1)="G"),VLOOKUP(LEFT(A1,2),G2:H4,2,FALSE))

However it doesn't work as it returns ACR for everything.

Any advice would be much appreciated.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
where did ACR come from, as it isn't referred in the info you provided ?

BTW, the formula works fine for me !!
 
Upvote 0
Hello,

Your explanation is quite confusing ...

How can your formula return ACR ... when this symbol is not present in your lookup table ...!!!

For info ... your formula seems OK ...:wink:
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

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