MULTIPLE IF AND OR FUNCTIONS

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello experts, I am posting the image of the file with full details. If it is possible to enter a formula as discussed in the sheet.....
Query Multiple IF's.xlsx
ABCDEFGHJLNPQRSTUVWX
1STATIC VALUEVARIABLE COLUMNSCOLUMNS WHERE THE FORMULA TO BE ENTEREDVARIABLE COLUMNS
2GRAND TOTALA TOTALB TOTALABCDABCDR/ODiff
3Rows for reference onlyxx51218282.56914
41051001002.5-50ROW 4ROW 5ROW 6ROW 7
51121001006-120IF B4="",""IF B5="",""IF B6="",""IF B7="",""
61181001009-180IF J4,L4 AND N4=""IF H5, L5 AND N5=""IF H6,J6 AND N6=""IFJ7, J7 AND L7=""
712810010014-280THEN E4,F4 AND G4=""THEN D5,F5 AND G5="" THEN D6, E6 AND G6=""THEN D7,E7 AND F7=""
82172001001002.56-170AND D4=B4AND E5=N5/6*100AND F6=P6/9*100AND G7=R7/14*100
923020010010069-300
10246200100100914-460ROW 8ROW 9ROW 10ROW 11
112232001001002.59-230IF B8="",""IF B9="",""IF B10="",""IF B11="",""
122332001001002.514-330IF L8 AND N8=""IF H9 AND N9=""IF H10 AND J10=""IF J11 AND N11=""
133353001001001002.569-350THEN F8 AND G8 =""THEN D9 AND G9=""THEN D10 AND E10=""THEN E11 AND G11 =""
143583001001001006914-580AND D8=H8/2.5*100AND E9=J9/6*100AND F10=L10/9*100AND D11=H11/2.5*100
153513001001001002.5914-510ANDAND ANDAND
163453001001001002.5614-450F8=B8-D8G8=B9-E9G10=B10-F10F11=B11-D11
174634001001001001002.56914-630
18240200100100614-400ROW 12ROW 13ROW 14ROW 15
19IF B12="",""IF B13="",""IF B14="",""IF B15="",""
20I WILL TRY TO EXPLAIN MY PROBLEM AS SIMPLE AS POSSIBLEIF J12 AND L12=""IF N13=""IF H14=""IF J15=""
21If you change the amount in column B the difference amount in column Y should be zero onlyTHEN E12 AND F12 =""THAN G13=""THAN D14=""THAN E15=""
22I have given different formulas manually in columns D to KAND D12=H12/2.5*100THEN D13=H13/2.5*100AND E14=J14/6*100AND D15=H15/2.5*100
23There can be 15 different calculations for each amount entered in Column B ANDANDANDAND
24The number of entries are in 1000's. I have been calculating it manually for each row using sort and filter optionsG12=B12=D12E13=J13/6*100F14=L14/9*100F15=L15/9*100
25I know it is possible to make it easy by giving a formula in the Row 4 from D4:K4 in each column and copy the formula till the last entryANDANDAND
26Due to lack of knowledge of multiple "IF", "AND" & "OR", I am finding it difficult to solve this. I would like to know and understandF13=B13-H13-J13G14=B14-J14-L14G15=B15-D15-L15
27Since the last few weeks I have been trying but not able to solve it. I would really appreciate any help in solving this.
28Why don't you experts give it a try. If the solution is solved it will save me hours of workROW 16ROW 17ROW 18
29Please note that the amounts in columns H:P are also variables like in column BIF B16="",""IF B17="",""IF B18="",""
30Column C is an extension of my project and it will require to change only the references once I find a solutionIF J16=""IF H17, J17,L17 AND N17<>""IF H18 AND L18 =""
31How it worksTHEN F16=""THEN D17=H16/2.5*100THEN D18="", F18=""
32In columns H,J,L and N if there is amount in one cell only then it takes the amount from column BAND D16=H16/2.5*100AND E17=J17/6*100AND E18=J18/6*100
33if there are amounts in any 2 cells in H, J, L and N then the first cell in D, E, F and G should be calculated from the corresponding column ANDAND F17=L17/9*100AND G18=B18-E18
34and the second cell amount should be taken after deducting the total amount from the first calculated amountF16= L16/9*100AND G17=B17-D17-E17-F17
35if there are amounts in 3 cells the again the first cell amount should be calculated from the corresponding column AND
36the second amount also to be calculated from the corresponding columnG16=B16-D16-F16
37and then in the third cell it should deduct the total amount from the first and second calculation amounts
38if there are amounts in all 4 cells then the first cell amount should be calculated from the corresponding column
39the second cell amount also to be calculated from the corresponding column
40the third cell amount also to be calculated from the corresponding column
41and the fourth cell it should deduct the total amount from the first, second and third calculated amounts
42
43
44
45
QUERY
Cell Formulas
RangeFormula
D4D4=B4
P4:P18P4=B4+C4-SUM(D4:O4)
Q4:Q18Q4=A4-SUM(D4:O4)
E5E5=B5
F6F6=B6
G7G7=B7
D8,D15:D17,D11:D13D8=H8/2.5*100
E8E8=B8-D8
E9,E16:E17,E13:E14E9=J9/6*100
G10G10=B10-F10
F9F9=B9-E9
F10,F17,F14:F15F10=L10/9*100
F11F11=B11-D11
G12G12=B12-D12
F13F13=B13-D13-E13
G14G14=B14-E14-F14
G15G15=B15-D15-F15
G16G16=B16-D16-E16
A4:A17A4=SUM(C4:O4)
G17G17=B17-D17-E17-F17
 
@RAJESH1960
In future please put your your question in the post, NOT in your spreadsheet as it makes things more difficult for any potential helpers.
Also please do not type everything in caps as it's considered shouting.
Thanks
Understood Fluff. Next time, I will keep in mind. No writing questions in the spread sheets and message not in caps. :)
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Maabadi, I have posted again a different sheet. Please check
The columns g h i j in the original data are blank and are calculated manually.
If there is only one value in columns k m o q then in column g h i j the amount is taken directly from the subtotal
If there are more than one values in columns k m o q then
The first value is calculated by a formula as shown in column g h i j
And the last amount is taken after deducting the subtotal from the value of the calculated other cell
This way the gross total and subtotal and difference amounts will not change
To test the sheet, check the cells k m o q which have values in at least in 2 cells and change the amount in white cells to a lesser number. The sub total should not change
Example if you change the values in k6 from 29 to 19, then automatically the value in cell m6 should change and the sub total should be the same
That is why the second value of the cell in m6 should be calculated by deducting the value in f6 with k6
Same way where the white cells have values in more than one column then the last value should be calculated by deducting subtotal from the sum of values of calculated values
I want to replace the formula in g h i j with one single formula
Please check the formulas given in all the cells in columns g h i j. All are different which cannot be dragged down but will have to be done manually.
 
Upvote 0
This is for your 2nd Table. Insert at G2 and drag it right (to column J) & down.
Excel Formula:
=IF(AND(COLUMN()-COLUMN($F$2)=4,D2="",E2="",F2=""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/14*100),IF(COLUMN()-COLUMN($F$2)=4,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-3))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-3)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),IF(AND(COLUMN()-COLUMN($F$2)=3,OR(D2<>"",E2<>"")),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/9*100)),IF(AND(COLUMN()-COLUMN($F$2)=2,F2<>""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(AND(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,INDIRECT(ADDRESS(ROW(),2*COLUMN()+1))=0),$F2-$G2,INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/6*100)),IF(ROW()-ROW($F$2)<4,IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",$F2),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/2.5*100))))))
 
Upvote 0
This is for your 2nd Table. Insert at G2 and drag it right (to column J) & down.
Excel Formula:
=IF(AND(COLUMN()-COLUMN($F$2)=4,D2="",E2="",F2=""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/14*100),IF(COLUMN()-COLUMN($F$2)=4,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-3))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-3)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),IF(AND(COLUMN()-COLUMN($F$2)=3,OR(D2<>"",E2<>"")),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/9*100)),IF(AND(COLUMN()-COLUMN($F$2)=2,F2<>""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(AND(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,INDIRECT(ADDRESS(ROW(),2*COLUMN()+1))=0),$F2-$G2,INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/6*100)),IF(ROW()-ROW($F$2)<4,IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",$F2),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/2.5*100))))))
Maabadi, OMG!! You really worked this. Thanks a lot man, for your effort to solve it. But the total's change in cells G17, H17, I17 and J17 when I copied your formula and dragged it down, and the amounts too don't tally in columns H I and J. Only G is perfect. The columns H I AND J need some corrections. I hope you have the sheet with you. Then too I am posting the sheet after the formula is pasted.
new query mr.excel.xlsx
ABCDEFGHIJKLMNOPQRSTU
1DateParticularsVch No.xyzGROSS AMOUNTSUB TOTAL A5% A12% A18% A28% AVARIABLES 2.5%VARIABLES 2.5%VARIABLES 6%VARIABLES 6%VARIABLES 9%VARIABLES 9%VARIABLES 14%VARIABLES 14%Round OffDiff
201-11-2020January11930.001840.001840.00  0.0046.0046.00-2.000.00
302-11-2020February23528.003150.00 3150.00 0.00189.00189.000.000.00
403-11-2020March31311.002222.22  2222.220.00200.00100.00-1211.220.00
504-11-2020April41033.00807.14   807.14113.00113.00-0.140.00
605-11-2020May53626.003310.001160.002150.00 0.0029.0029.00129.00129.000.000.00
706-11-2020June65560.005191.434720.00  471.43118.00118.0066.0066.000.570.00
807-11-2020July73308.002773.81 3640.00 -866.1991.0091.00176.00176.000.190.00
908-11-2020August81993.001882.221760.00 122.220.0044.0044.0011.0011.000.780.00
1009-11-2020September92703.002188.89  988.891200.0089.0089.00168.00168.000.110.00
1110-11-2020October109519.008754.444960.002783.331011.110.00124.00124.00167.00167.0091.0091.000.560.00
1211-11-2020November114125.003451.59 3320.00711.11-579.5283.0083.0064.0064.00190.00190.00-0.590.00
1312-11-2020December123930.003541.902480.00 333.33728.5762.0062.0030.0030.00102.00102.000.100.00
1413-11-2020January134158.003612.381360.00966.67 1285.7134.0034.0058.0058.00180.00180.001.620.00
1514-11-2020February149239.008343.175240.00350.001788.89964.29131.00131.0021.0021.00161.00161.00135.00135.00-0.170.00
1614-11-2020March151000.000.00    1000.000.00
17Grand Total56,963.0051,069.2123,520.0016,360.007,177.784,011.43588.00588.00738.00738.00646.00546.001,130.001,130.00(210.21)
18Total before inserting the formula23,520.0012,300.0012,137.788,071.43
19
QUERY (2)
Cell Formulas
RangeFormula
G2:J16G2=IF(AND(COLUMN()-COLUMN($F$2)=4,D2="",E2="",F2=""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/14*100),IF(COLUMN()-COLUMN($F$2)=4,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-3))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-3)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),IF(AND(COLUMN()-COLUMN($F$2)=3,OR(D2<>"",E2<>"")),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/9*100)),IF(AND(COLUMN()-COLUMN($F$2)=2,F2<>""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(AND(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,INDIRECT(ADDRESS(ROW(),2*COLUMN()+1))=0),$F2-$G2,INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/6*100)),IF(ROW()-ROW($F$2)<4,IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",$F2),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/2.5*100))))))
S2:S16S2=E2-SUM(G2:R2)
T2:T16T2=E2-SUM(G2:S2)
E17:S17E17=SUM(E2:E16)
 
Upvote 0
Maabadi, OMG!! You really worked this. Thanks a lot man, for your effort to solve it. But the total's change in cells G17, H17, I17 and J17 when I copied your formula and dragged it down, and the amounts too don't tally in columns H I and J. Only G is perfect. The columns H I AND J need some corrections. I hope you have the sheet with you. Then too I am posting the sheet after the formula is pasted.
new query mr.excel.xlsx
ABCDEFGHIJKLMNOPQRSTU
1DateParticularsVch No.xyzGROSS AMOUNTSUB TOTAL A5% A12% A18% A28% AVARIABLES 2.5%VARIABLES 2.5%VARIABLES 6%VARIABLES 6%VARIABLES 9%VARIABLES 9%VARIABLES 14%VARIABLES 14%Round OffDiff
201-11-2020January11930.001840.001840.00  0.0046.0046.00-2.000.00
302-11-2020February23528.003150.00 3150.00 0.00189.00189.000.000.00
403-11-2020March31311.002222.22  2222.220.00200.00100.00-1211.220.00
504-11-2020April41033.00807.14   807.14113.00113.00-0.140.00
605-11-2020May53626.003310.001160.002150.00 0.0029.0029.00129.00129.000.000.00
706-11-2020June65560.005191.434720.00  471.43118.00118.0066.0066.000.570.00
807-11-2020July73308.002773.81 3640.00 -866.1991.0091.00176.00176.000.190.00
908-11-2020August81993.001882.221760.00 122.220.0044.0044.0011.0011.000.780.00
1009-11-2020September92703.002188.89  988.891200.0089.0089.00168.00168.000.110.00
1110-11-2020October109519.008754.444960.002783.331011.110.00124.00124.00167.00167.0091.0091.000.560.00
1211-11-2020November114125.003451.59 3320.00711.11-579.5283.0083.0064.0064.00190.00190.00-0.590.00
1312-11-2020December123930.003541.902480.00 333.33728.5762.0062.0030.0030.00102.00102.000.100.00
1413-11-2020January134158.003612.381360.00966.67 1285.7134.0034.0058.0058.00180.00180.001.620.00
1514-11-2020February149239.008343.175240.00350.001788.89964.29131.00131.0021.0021.00161.00161.00135.00135.00-0.170.00
1614-11-2020March151000.000.00    1000.000.00
17Grand Total56,963.0051,069.2123,520.0016,360.007,177.784,011.43588.00588.00738.00738.00646.00546.001,130.001,130.00(210.21)
18Total before inserting the formula23,520.0012,300.0012,137.788,071.43
19
QUERY (2)
Cell Formulas
RangeFormula
G2:J16G2=IF(AND(COLUMN()-COLUMN($F$2)=4,D2="",E2="",F2=""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/14*100),IF(COLUMN()-COLUMN($F$2)=4,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-3))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-3)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),IF(AND(COLUMN()-COLUMN($F$2)=3,OR(D2<>"",E2<>"")),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/9*100)),IF(AND(COLUMN()-COLUMN($F$2)=2,F2<>""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(AND(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,INDIRECT(ADDRESS(ROW(),2*COLUMN()+1))=0),$F2-$G2,INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/6*100)),IF(ROW()-ROW($F$2)<4,IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",$F2),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/2.5*100))))))
S2:S16S2=E2-SUM(G2:R2)
T2:T16T2=E2-SUM(G2:S2)
E17:S17E17=SUM(E2:E16)
 
Upvote 0
12,137.78
Sorry it was 7177.78 earlier before the formula and not 12,137.78. So the column I is also right. If you check the formula in 8th and 12th row, the amounts are negative. So, the formula's mistake is in somewhere there.
 
Last edited:
Upvote 0
Test this at G2:
Excel Formula:
=IF(AND(COLUMN()-COLUMN($F$2)=4,D2="",E2="",F2=""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/14*100),IF(COLUMN()-COLUMN($F$2)=4,IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-3))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-3)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1)))),IF(AND(COLUMN()-COLUMN($F$2)=3,OR(D2<>"",E2<>"")),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/9*100)),IF(AND(COLUMN()-COLUMN($F$2)=2,F2<>""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(AND(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,INDIRECT(ADDRESS(ROW(),2*COLUMN()+1))=0),$F2-$G2,INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/6*100)),IF(F2="",IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/6*100),IF(ROW()-ROW($F$2)<4,IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",$F2),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/2.5*100)))))))
 
Upvote 0
Test this at G2:
Excel Formula:
=IF(AND(COLUMN()-COLUMN($F$2)=4,D2="",E2="",F2=""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/14*100),IF(COLUMN()-COLUMN($F$2)=4,IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-3))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-3)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1)))),IF(AND(COLUMN()-COLUMN($F$2)=3,OR(D2<>"",E2<>"")),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,$F2-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-2))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-2)))-IF(INDIRECT(ADDRESS(ROW(),COLUMN()-1))="",0,INDIRECT(ADDRESS(ROW(),COLUMN()-1))),INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/9*100)),IF(AND(COLUMN()-COLUMN($F$2)=2,F2<>""),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",IF(AND(INDIRECT(ADDRESS(ROW(),2*COLUMN()-1))=0,INDIRECT(ADDRESS(ROW(),2*COLUMN()+1))=0),$F2-$G2,INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/6*100)),IF(F2="",IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/6*100),IF(ROW()-ROW($F$2)<4,IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",$F2),IF(INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))=0,"",INDIRECT(ADDRESS(ROW(),2*COLUMN()-3))/2.5*100)))))))
Perfect Mr. Perfect. How much ever I would have tried to solve this, I wouldn't have, let alone, even thought that it will be such a big formula and done it. Thank you so much ?
 
Upvote 0
You 're Welcome & Glad I can help. Good Luck.
Maabadi, I was going through the formula to understand it, which I always do to understand it and use that knowledge when and where ever required in future. But I just can't understand the head and tail of it. It's too advanced for me. The question I posted was only half of the full question. I thought if I got the correct answer I will be able to edit it and complete the other remaining half. But only you can help me to complete it as it is too complicated for me. If it's ok with you, can I re-post the whole question. It is just another additional 4 columns but with different taxes. Please reply and let me know.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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