6000 X
5000 Y
2000 Y
3000 X
2500 Y
1280 X
3000 X
If column A with values and the column B with Letters,
please advise me how to find this..
if B1 is X, C1 will be 3% of A1, and if B1 is Y, C1 will be 2% of A1
6000 X
5000 Y
2000 Y
3000 X
2500 Y
1280 X
3000 X
If column A with values and the column B with Letters,
please advise me how to find this..
if B1 is X, C1 will be 3% of A1, and if B1 is Y, C1 will be 2% of A1
=if( B1="X", A1*0.03, IF( B1="Y", a1*0.02, "B does not = Y or X"))
If you can only have a Y or an X in column B
this can be simplified to
=if( B1="X", A1*0.03, a1*0.02)
Wayne
if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here
If you have a solution to your thread - Please mark your thread solved do the following: >
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
Hi,
a possible approach:
=A1*(B1="X")*3%+A1*(B1="Y")*2%
Regards
-----------------------------------------------------
At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.
Please, mark your thread [SOLVED] if you received your answer.
Maybe:Formula:Please Login or Register to view this content.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Slight variation on Canapone's formula:Formula:Please Login or Register to view this content.
His formula is good because, if column B is neither "X" or "Y" you will automatically get zero (0) returned.
Regards, TMS
Thank you very much.. it works...
This is also correct but, I dont get it.. thanks anyway..
your welcome, thanks for the rep
You're welcome.
B1="X" will be TRUE if B1 contains the value "X". This will be evaluated as one (1) so, multiplied by 3% gives you 3% of A1. If B1 does not contain "X", it will be FALSE and evaluated as zero (0), and when multiplied by 3% gives you 0% of A1. Similarly, you compare to "Y". If B1 is not "X" or "Y", both equations will evaluate to 0.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
New quick method:
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
Or you can use this way:
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks