Letters with numeric values for formulas

dannyok90

Board Regular
Joined
Aug 30, 2016
Messages
115
Im trying to create a Purchase order form, amongst other problems I'm facing, the one I'm trying to tackle at the moment is as follows,

I'm trying to use letters as 'code' for Tax percentages, take a look at the following

Screen_Shot_2016_08_30_at_21_13_15.png


so after i have entered the quantity and the unit price, the 'amount' column will populate with a simple
'=[unit price]*[quantity]'

when i then enter 'S' into the 'TAX' Column i want it to add 20% onto the 'amount' column


but just to make it that bit trickier i have about three different letters representing different tax percentages

I'm pretty much a noob to excel, I'm pretty literate and capable :LOL: but simple explanations would help haha

many thanks
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Nested IF statement:

=IF(D1="",(B1*C1),IF(D1="A",((B1*C1)/100)*5+(B1*C1),IF(D1="B",((B1*C1)/100)*10+(B1*C1),IF(D1="C",((B1*C1)/100)*20+(B1*C1)))))
 
Upvote 0
But what you want to aim for is:

=IF(D1="",(B1*C1),((B1*C1)/100)*VLOOKUP(D1,I1:J3,2)+(B1*C1))

This formula takes into account the in cells I1, I2, I3 you have A, B, C "being the letters you wish to use" & in cells J1, J2, J3 you have 5, 10, 20 "being the percentage rates you wish to assign to each letter"
 
Upvote 0
But what you want to aim for is:

=IF(D1="",(B1*C1),((B1*C1)/100)*VLOOKUP(D1,I1:J3,2)+(B1*C1))

This formula takes into account the in cells I1, I2, I3 you have A, B, C "being the letters you wish to use" & in cells J1, J2, J3 you have 5, 10, 20 "being the percentage rates you wish to assign to each letter"


Thanks! I think i slightly understand, i would create a table in a new sheet with and then paste the =IF formula into the total cell.. then manipulate the cells in the formula to suit..

this is a bigger picture of my spreadsheet

Screen_Shot_2016_08_30_at_23_19_58.png
 
Upvote 0
This is what i tried, but its coming up with an error, on sheet two all i have for the moment is is
A B C
1 S 20
2

IF+(d19="",(c19*b19),((c19*b19)/100)*VLOOKUP(Sheet2!A1:B1)+(c19*b19))
 
Upvote 0
If you create the table in another sheet, highlight all the cells (6) of the table. you can then right click & give the newly created table a name e.g TaxCODES

your formula would then look like this

=IF(D1="",(B1*C1),((B1*C1)/100)*VLOOKUP(D1,TaxCODES,2)+(B1*C1))

Like you say, you can manipulate the formula to suit your needs

 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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