choose formula help

ganeshpoojary05

Board Regular
Joined
Apr 26, 2011
Messages
105
Hi all,

I need a help in a formula. I'm pasting the example below:

Range(A1) can contain "A", "B", "C", "D", "E", or "F"

and if A1 contains A then it should return a value 100, if B then 200, if C then 300, if D then 400, if E then 500, if F then 600. I know this can be possible by If condition, but i need some more easier and short formula. Please help. Thanks in advance for your assistance.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi,

If you are saying that A1 can be equal to A, B....maybe this

=LOOKUP(A1,{"A";"B";"C";"D";"E";"F"},{100;200;300;400;500;600})

HTH

M.
 
Upvote 0
Hi all,

I need a help in a formula. I'm pasting the example below:

Range(A1) can contain "A", "B", "C", "D", "E", or "F"

and if A1 contains A then it should return a value 100, if B then 200, if C then 300, if D then 400, if E then 500, if F then 600. I know this can be possible by If condition, but i need some more easier and short formula. Please help. Thanks in advance for your assistance.
Assuming the entries can only be the letters A thru F...

=IF(A1="","",SEARCH(A1,"ABCDEF")*100)

Or:

=SEARCH(A1,"ABCDEF")*100*(A1<>"")
 
Upvote 0
But in his formula, the exact value is not returned for example if the cell A1 is other than ABCDEF then to the value is returned.
OK, if the cell contains something other than ABCDEF what result do you want?

What version of Excel are you using?
 
Upvote 0
You will need to either combine the solutions to suit your requirements like:
=IF((CODE(A1)-64)<=6,LOOKUP(A1,{"A";"B";"C";"D";"E";"F"},{100;200;300;400;500;600}),"NOT FOUND")
Or use a lookup table as suggested at #2
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,718
Members
452,939
Latest member
WCrawford

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