Link to home
Start Free TrialLog in
Avatar of ssblue
ssblueFlag for United States of America

asked on

Excel IF statement

column C (ActType) has the following items in it:  PRDIEM  PSNEOT  PSNE1  PSCROT  PSPR1  PSPR2

I need to fill column K (GL) with the appropriate GL acct #'s:  800100  800110  800200

Based on the following:

PRDIEM  is  800200
PSNEOT  is  800110
PSNE1  is  800100
PSCROT  is  800110
PSPR1  is  800100
PSPR2  is  800100
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Assuming your data starts from K2, use below formula:
=IF(C2="PRDIEM","800200",IF(OR(C2="PSNEOT",C2="PSCROT"),"800110",IF(OR(C2="PSNE1",C2="PSPR1",C2="PSPR2"),"800100")))

Open in new window

Else create a Table in Sheet2 and do the vlookup with below formula:
=IFERROR(VLOOKUP(C2,Sheet2!A:B,2,0),"")

Open in new window

ssblue_GL-Account.xlsx
Avatar of ssblue

ASKER

the top equation is returning TRUE
ASKER CERTIFIED SOLUTION
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ssblue

ASKER

Thanks!