Need to add one condition to the formula

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello guys

I need your expert help to add a condition to the formula. I want to edit the formula in column J to get the correct result. If the rates in column N are different then the formula in column J should add the taxable value in column H and display in column J. If the rates in column N are same then the formula in column J should not add the taxable value but show one value only in column J.

Book1
ABCDEFGHIJKLMNO
1ABTINNAMEInvoice numberCDTaxable Value (₹)IGSTcombine taxableCombined TaxCGSTSGSTRate (%)
2152439AKXPR3359E3ZJCustomer 1IN-ZSHB-371052159.320.002159.32194.34194.34194.3418
31139AALCA3377L3Z6Customer 2SMN008305200257711863.560.0023727.122135.441067.721067.7218MISTAKE
433839AALCA3377L3Z6Customer 2SMN008305200257711863.560.00Delete RowDelete Row1067.721067.7218
5164534AAECB3833N3ZUCustomer 3GST-53026733.501336.6826733.501336.680.000.005
68639AACCC8357H3ZECustomer 4181/2020-211300.000.001300.00117.00117.00117.0018
7161539ABHPC3938R3Z8Customer 5ICHABE202100050412480.500.0018540.341968.331123.251123.2518CORRECT
8161639ABHPC3938R3Z8Customer 5ICHABE20210005046031.270.00Delete RowDelete Row844.37844.3728
9161739ABHPC3938R3Z8Customer 5ICHABE202100050428.570.00Delete RowDelete Row0.710.715
1037737AELPN4353H3ZCCustomer 6IN-462531072.88193.122145.76386.240.000.0018MISTAKE
116837AELPN4353H3ZCCustomer 6IN-462531072.88193.12Delete RowDelete Row0.000.0018
1261839AAJFD5433B3ZRCustomer 7KA-1176-20-2151509.520.0051509.521287.741287.741287.745
1378339AAJFD5433B3ZRCustomer 7KA-1274-20-212761.900.0025714.581446.2169.0569.055CORRECT
1478439AAJFD5433B3ZRCustomer 7KA-1274-20-2122952.680.00Delete RowDelete Row1377.161377.1612
15178237AAHPG6373H3ZOCustomer 82020-21-124326880.001344.0026880.001344.000.000.005
COMBINE TAXABLE VALUE
Cell Formulas
RangeFormula
J2:J15J2=IF(COUNTIFS(C$2:C2,C2,E$2:E2,E2)=1,SUMIFS(H:H,C:C,C2,E:E,E2),"Delete Row")
K2:K15K2=IF(COUNTIFS(C$2:C2,C2,E$2:E2,E2)=1,IF(I2<>0,SUMIFS(I:I,C:C,C2,E:E,E2),SUMIFS(L:L,C:C,C2,E:E,E2)),"Delete Row")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E15Expression=COUNTIFS(D$2:D$15,D2,E$2:E$15,E2)>1textNO
 
There is one mismatch only to correct.
If that is the case I would suspect a problem with the data rather than the formula, possibly a typo / trailing space in Tin / Invoice number.

I did notice that the mini sheet in post 15 is shifted over 1 column when compared to the original but if you had set the formula to the wrong layout then I would have expected more errors in the results.
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
If that is the case I would suspect a problem with the data rather than the formula, possibly a typo / trailing space in Tin / Invoice number.

I did notice that the mini sheet in post 15 is shifted over 1 column when compared to the original but if you had set the formula to the wrong layout then I would have expected more errors in the results.
Yes I found the reference mistake. It worked in the sample sheet. Trying it now in the data base.
 
Upvote 0
Yes I found the reference mistake. It worked in the sample sheet. Trying it now in the data base.
Eureka. Finally got both taxable and tax right. Thank you very much for being with me till the last. If not for you, I would have not continued today. Once again Thanks.?
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,855
Members
449,096
Latest member
Erald

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