IF statement

AussieWayne

New Member
Joined
Nov 22, 2012
Messages
28
Hi guys I have a simple one for you I think. I am just not familiar enough to make it work although I think I am close but obviously not close enough.

I have 3 columns, H has letters and I has $ amounts and L is blank

H6......................I6.......... L6
AUD .................$123........
ABC .................$ 58
XYZ .................$224........

Where the test equals AUD I wish to show the $ value of I in L
When it does not equal AUD then L is to be blank

This is what i tried inserting into cell L6 but it is not working
=IF(H6="aud","I6","0")

Please someone show me the error of my ways.
Thank you in advance
 
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
i think try remove the "" around the cell reference, otherwise you just get the name of the cell
so change
=IF(H6="aud","I6","0")
to
=IF(H6="aud",I6,"0")
 
Upvote 0
Hello AussieWayne,

Try the following modification to your formula:-

Code:
=IF(H6="AUD",I6,[COLOR=#ff0000]""[/COLOR])

Just removing the 0 from "0" should suffice.

I hope that this helps.

Cheerio,
vcoolio.


..........and of course, no quotation marks around I6.
 
Last edited:
Upvote 0
Hi guys thank you both very much as I have success using both suggestions.

I was close but that is never good enough. One has to be spot on so I turned to the experts after I could not find the answer myself.
Best to all
AussieWayne
 
Upvote 0
Cheers Wayne.
Glad we could help.:beerchug:

Cheerio,
vcoolio.
 
Upvote 0
Hi guys to obtain meaningful results I now find that I actually need to insert a second test in Column B to make it True.
So I have
B6............H6......................I6.......... L6
Sell..........AUD .................$123........
Buy..........ABC .................$ 58
Sell..........XYZ .................$224........
and I need to have ONLY the records that have BOTH "Sell" and "AUD" in their respective columns.
I guess I need a nesting AND condition and have tried a few things but cant quite work it out.

Can somebody advise what do I need to add this in please?
Thanking you again.
AussieWayne

 
Upvote 0
Hello again AussieWayne,

This should do the task for you:-

Code:
=IF(AND(B6="Sell",H6="AUD"),I6,"")

Cheerio,
vcoolio.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,335
Members
452,636
Latest member
laura12345

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