Excel calculate tax

varunwalla

New Member
Joined
Aug 13, 2020
Messages
32
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. Mobile
  3. Web
I have two tax type
  1. Slab 1 &
  2. Slab 2
In sheet 1 Column G the tax value should be calculated based on the Column F and the value should be calculated from sheet 2 and please check the desired output of the tax value in column I

tax.xlsx
ABCDEFGHI
1NoNameQTYPriceTotal PriceTax TypeTax ValueFinal PriceDesired Output In Column G
21CTI52001000Slab 11000280
32CTI3195585Slab 1585205.3
43TCI3200600Slab 2600238
54CCC4100400Slab 2400192
65ICN3250750Slab 1750235
Sheet1
Cell Formulas
RangeFormula
H2:H6H2=(E2+G2)
I2:I3,I6I2=((E2*18)/100)+100
I4:I5I4=((E4*23)/100)+100
E2:E6E2=(C2*D2)



tax.xlsx
ABC
1IndexSlab 1Slab 2
2GST0.180.23
3DC10050
Sheet2
Cell Formulas
RangeFormula
B2B2=(18/100)
C2C2=(23/100)
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi there
you can use HLookup, or Xlookup in excel 365, to return your tax rate from sheet 2 then use that in your calculation,
So G2 will be something like =E2*HLOOKUP(F2,Sheet2!$A$1:$C$2,2,FALSE)+100
 
Upvote 0
Why are I4 and I5 238 and 192 and not 188 and 142 respectively as they come under Slab2?
 
Upvote 0
Hi there
you can use HLookup, or Xlookup in excel 365, to return your tax rate from sheet 2 then use that in your calculation,
So G2 will be something like =E2*HLOOKUP(F2,Sheet2!$A$1:$C$2,2,FALSE)+100

thanks man it works

Why are I4 and I5 238 and 192 and not 188 and 142 respectively as they come under Slab2?
wow you found mistake
 
Upvote 0
Formula in Column G or Column H

Book1
ABCDEFGHIJ
1NoNameQTYPriceTotal PriceTax TypeTax Value2Tax ValueFinal PriceDesired Output In Column G
21CTI52001000Slab 12802801280280
32CTI3195585Slab 1205.3205.3790.3205.3
43TCI3200600Slab 2188188788238
54CCC4100400Slab 2142142542192
65ICN3250750Slab 1235235985235
Sheet1
Cell Formulas
RangeFormula
G2:G6G2=E2*HLOOKUP(F2,Sheet2!$B$1:$C$3,2,0)+HLOOKUP(F2,Sheet2!$B$1:$C$3,3,0)
H2:H6H2=E2*INDEX(Sheet2!$B$2:$C$2,MATCH(F2,Sheet2!$B$1:$C$1,0))+INDEX(Sheet2!$B$3:C$3,MATCH(F2,Sheet2!$B$1:$C$1,0))
I2:I6I2=(E2+G2)
J2:J3,J6J2=((E2*18)/100)+100
J4:J5J4=((E4*23)/100)+100
E2:E6E2=(C2*D2)
 
Upvote 0
Hello, Your column E is exactly the same as column H, so are you looking for a code, so you just click and everything is done?
 
Upvote 0
Hello, Your column E is exactly the same as column H, so are you looking for a code, so you just click and everything is done?
Column H in the original post has a formula in it and so it changes when you put numbers in column G.
 
Upvote 0
I am trying JUST to help. I am NOT an expert.
if I am in that sheet with that info, this is what I do,
and please, CORRECT ME.
VBA Code:
Sub varunwalla()
         Dim x As Long
         Dim y As Long
                  For x = 2 To 6
                           For y = 5 To 5
                                          Cells(x, "J").Value = Cells(x, "E").Value * (18 / 100) + 100
                           Next y
                  Next x
End Sub
This is what I got.
1599140414765.png
 
Upvote 0
First of all I wasn't chastising you, I was just pointing out that column H had a formula in it which is why it looks the same as column E as there was no data in column G in the first post.

Anyway I think that you will need to amend your code as the it is not always +100 the reply below
wow you found mistake
is because Slab2 is cell C2 (the tax rate being multiplied) + C3 (50, the 100 (B3) only applies to Slab1).
The result should appear in column G and should be

Book1
G
2280
3205.3
4188
5142
6235
Sheet1


Based on the OP's original figures
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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