lethach

New Member
Joined
Apr 5, 2012
Messages
1
I have a funtion like: =IF(LEFT(A3,1)="A",1000,IF(LEFT(A3,1)="B",2000,IF(LEFT(A3,1)="C",3000,4000)))
In this formula, LEFT(A3,1) appear three times and excel will run LEFT funtion three times.
Can use like this?
=IF(LEFT(A3,1) AS X="A",1000, IF(X)="B",2000,IF(X)="C",3000,4000)))

Thanks. I speak english very bad.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
This is an alternative

=LOOKUP(LEFT(A3,1),{"A","B","C","D"},{1000,2000,3000,4000})
 
Upvote 0
..and another:
=IFERROR(CHOOSE(SEARCH(LEFT(A3,1),"ABC"),1000,2000,3000),4000)

or if using versions of excel prior to xl2007:
=IF(ISERR(SEARCH(LEFT(A3,1),"ABC")),4000,CHOOSE(SEARCH(LEFT(A3,1),"ABC"),1000,2000,3000))
 
Upvote 0

Forum statistics

Threads
1,215,773
Messages
6,126,817
Members
449,340
Latest member
hpm23

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