If statement help

Jazzer

Board Regular
Joined
Jun 14, 2011
Messages
71
Hi All,

Could somebody please provide me with the correct formula for the following

Basically

if New_Data!D8 = R I want New_Trades!B13 to = Repo
if New_Data!D8 = Q I want New_Trades!B13 to = Reverse Repo
if New_Data!D8 = T I want New_Trades!B13 to = Outright Purchase
if New_Data!D8 = U I want New_Trades!B13 to = Outright Sale

Many Thanks
James
 
Last edited:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Is it just those two criteria?
R=Repo
Q=Reverse Repo

Or will it go on for more possiblities, like
T=Text3
S=Text4
Etc?

what result do you want if it doesn't equal either option? A blank?
 
Upvote 0
just the 4 criteria (mentioned above - edited my original post from 2)

if blank then I would happy with 0 as the result
 
Upvote 0
Try

=LOOKUP(New_Data!D8,{"R","Q","T","U"},{"Repo","Reverse repo","Outright purchase","Outright sale"})
 
Upvote 0

Forum statistics

Threads
1,224,604
Messages
6,179,857
Members
452,948
Latest member
UsmanAli786

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