Dear Experts,
I am trying to get results along with changing headings in ROW 7 to 14 based on the selection of B2:B6 from the array C19:AX24.
I need formula only to bring headings based on the selection in B2:B6 in rows 7 to 9, whereas I have applied formula from row 10 to 14 please do correction in case my formula need any change.
Please don't suggest VBA code or pivot table options.
View 1 - as shown below, I have selected View = Years by Scenario, Number of Scenario = Scenario 2 so I need 2 if I select 4 than I need 4 Scenarios, Number of Years = 2 similarly if I select 4 it should give 4 years data, Sector = 2 if I put 3 all three sectors needs to be there.
View 1
View 2
View 3
I am trying to get results along with changing headings in ROW 7 to 14 based on the selection of B2:B6 from the array C19:AX24.
I need formula only to bring headings based on the selection in B2:B6 in rows 7 to 9, whereas I have applied formula from row 10 to 14 please do correction in case my formula need any change.
Please don't suggest VBA code or pivot table options.
View 1 - as shown below, I have selected View = Years by Scenario, Number of Scenario = Scenario 2 so I need 2 if I select 4 than I need 4 Scenarios, Number of Years = 2 similarly if I select 4 it should give 4 years data, Sector = 2 if I put 3 all three sectors needs to be there.
View 1
Mr. Excel.xlsm | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | |||
1 | User selection | ||||||||||||||||||||||||||||||||||
2 | View | Scenario by years | View No.1 | ||||||||||||||||||||||||||||||||
3 | Number of Scenario | Scenario 2 | |||||||||||||||||||||||||||||||||
4 | Number of of Years | Y4 | |||||||||||||||||||||||||||||||||
5 | Sector | 3 | |||||||||||||||||||||||||||||||||
6 | Number of columns | ||||||||||||||||||||||||||||||||||
7 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 2 | |||||||||||
8 | Y1 | Y1 | Y1 | Y2 | Y2 | Y2 | Y3 | Y3 | Y3 | Y4 | Y4 | Y4 | Y1 | Y1 | Y1 | Y2 | Y2 | Y2 | Y3 | Y3 | Y3 | Y4 | Y4 | Y4 | |||||||||||
9 | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | |||||||||||
10 | Sales | 1,000 | 1,100 | 1,200 | 1,060 | 1,070 | 1,080 | 1,180 | 1,190 | 2,000 | 2,000 | 1,290 | 1,234 | 1,010 | 1,210 | 900 | 1,090 | 1,100 | 1,110 | 2,010 | 2,020 | 2,030 | 1,002 | 987 | 3,000 | - | - | - | - | ||||||
11 | Cost | 111 | 110 | 123 | 180 | 900 | 876 | 1,111 | 444 | 222 | 900 | 345 | 343 | 230 | 140 | 980 | 765 | 875 | 170 | 2,222 | 2,134 | 2,000 | 990 | 123 | 2,343 | - | - | - | - | ||||||
12 | GP | 889 | 990 | 1,077 | 880 | 170 | 204 | 69 | 746 | 1,778 | 1,100 | 945 | 891 | 780 | 1,070 | (80) | 325 | 225 | 940 | (212) | (114) | 30 | 12 | 864 | 657 | - | - | - | - | ||||||
13 | Expense | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | - | - | - | - | ||||||
14 | NP | 789 | 890 | 977 | 780 | 70 | 104 | (31) | 646 | 1,678 | 1,000 | 845 | 791 | 680 | 970 | (180) | 225 | 125 | 840 | (312) | (214) | (70) | (88) | 764 | 557 | - | - | - | - | ||||||
15 | |||||||||||||||||||||||||||||||||||
16 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 3 | Scenario 3 | Scenario 3 | Scenario 4 | Scenario 4 | Scenario 4 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 3 | Scenario 3 | Scenario 3 | Scenario 4 | Scenario 4 | Scenario 4 | Scenario 1 | Scenario 1 | Scenario 1 | Scenario 2 | Scenario 2 | Scenario 2 | Scenario 3 | ||||
17 | Y1 | Y1 | Y1 | Y1 | Y1 | Y1 | Y1 | Y1 | Y1 | Y1 | Y1 | Y1 | Y2 | Y2 | Y2 | Y2 | Y2 | Y2 | Y2 | Y2 | Y2 | Y2 | Y2 | Y2 | Y3 | Y3 | Y3 | Y3 | Y3 | Y3 | Y3 | ||||
18 | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | SF | CF | DF | ||||
19 | Sales | 1,000 | 1,100 | 1,200 | 1,010 | 1,210 | 900 | 1,020 | 1,111 | 789 | 1,030 | 1,040 | 1,050 | 1,060 | 1,070 | 1,080 | 1,090 | 1,100 | 1,110 | 1,120 | 1,130 | 1,140 | 1,150 | 1,160 | 1,170 | 1,180 | 1,190 | 2,000 | 2,010 | 2,020 | 2,030 | 2,040 | |||
20 | Cost | 111 | 110 | 123 | 230 | 140 | 980 | 333 | 500 | 800 | 120 | 145 | 160 | 180 | 900 | 876 | 765 | 875 | 170 | 267 | 900 | 1,432 | 876 | 621 | 999 | 1,111 | 444 | 222 | 2,222 | 2,134 | 2,000 | 657 | |||
21 | GP | 889 | 990 | 1,077 | 780 | 1,070 | (80) | 687 | 611 | (11) | 910 | 895 | 890 | 880 | 170 | 204 | 325 | 225 | 940 | 853 | 230 | (292) | 274 | 539 | 171 | 69 | 746 | 1,778 | (212) | (114) | 30 | 1,383 | |||
22 | Expense | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | |||
23 | NP | 789 | 890 | 977 | 680 | 970 | (180) | 587 | 511 | (111) | 810 | 795 | 790 | 780 | 70 | 104 | 225 | 125 | 840 | 753 | 130 | (392) | 174 | 439 | 71 | (31) | 646 | 1,678 | (312) | (214) | (70) | 1,283 | |||
24 | Rank | 18 | 11 | 8 | 23 | 9 | 43 | 25 | 27 | 42 | 14 | 15 | 17 | 19 | 37 | 35 | 31 | 34 | 13 | 21 | 33 | 48 | 32 | 28 | 36 | 39 | 24 | 2 | 47 | 45 | 40 | 5 | |||
Multiple formulas (2) |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C10:AD11,C13:AD13 | C10 | =SUMIFS($C19:$AX19,$C$16:$AX$16,C$7,$C$17:$AX$17,C$8,$C$18:$AX$18,C$9) |
C12:AD12,C14:AD14,C23:AG23,C21:AG21 | C12 | =C10-C11 |
C24:AG24 | C24 | =RANK.EQ(C23,$C$23:$AX$23,0) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
C24:AX24 | Other Type | Color scale | NO | |
C23:AX23 | Cell Value | duplicates | text | NO |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
B2 | List | Scenario by years, Years by scenario, Most Profitable |
B3 | List | =$A$27:$A$46 |
B4 | List | =$B$27:$B$46 |
B5 | List | =$C$27:$C$29 |
B6 | List | =$E$27:$E$75 |
View 2
Mr. Excel.xlsm | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | User selection | |||||||||||
2 | View | Years by scenario | View No.2 | |||||||||
3 | Number of Scenario | Scenario 2 | ||||||||||
4 | Number of of Years | Y2 | ||||||||||
5 | Sector | 2 | ||||||||||
6 | Number of columns | |||||||||||
7 | Scenario 1 | Scenario 1 | Scenario 2 | Scenario 2 | Scenario 1 | Scenario 1 | Scenario 2 | Scenario 2 | ||||
8 | Y1 | Y1 | Y1 | Y1 | Y2 | Y2 | Y2 | Y2 | ||||
9 | DF | SF | DF | SF | DF | SF | DF | SF | ||||
10 | Sales | 1,000 | 1,100 | 1,010 | 1,210 | 1,060 | 1,070 | 1,090 | 1,100 | |||
11 | Cost | 111 | 110 | 230 | 140 | 180 | 900 | 765 | 875 | |||
12 | GP | 889 | 990 | 780 | 1,070 | 880 | 170 | 325 | 225 | |||
13 | Expense | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | |||
14 | NP | 789 | 890 | 680 | 970 | 780 | 70 | 225 | 125 | |||
Multiple formulas (3) |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C10:J11,C13:J13 | C10 | =SUMIFS($C19:$AX19,$C$16:$AX$16,C$7,$C$17:$AX$17,C$8,$C$18:$AX$18,C$9) |
C12:J12,C14:J14 | C12 | =C10-C11 |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
B2 | List | Scenario by years, Years by scenario, Most Profitable |
B3 | List | =$A$27:$A$46 |
B4 | List | =$B$27:$B$46 |
B5 | List | =$C$27:$C$29 |
B6 | List | =$E$27:$E$75 |
View 3
Mr. Excel.xlsm | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | |||
1 | User selection | |||||||||||||||||||||||
2 | View | Most Profitable | View No.3 | |||||||||||||||||||||
3 | Number of Scenario | |||||||||||||||||||||||
4 | Number of of Years | |||||||||||||||||||||||
5 | Sector | |||||||||||||||||||||||
6 | Number of columns | 20 | ||||||||||||||||||||||
7 | Scenario 3 | Scenario 1 | Scenario 3 | Scenario 4 | Scenario 3 | Scenario 4 | Scenario 1 | Scenario 1 | Scenario 2 | Scenario 4 | Scenario 1 | Scenario 1 | Scenario 2 | Scenario 4 | Scenario 4 | Scenario 1 | Scenario 4 | Scenario 1 | Scenario 1 | Scenario 2 | ||||
8 | Y3 | Y3 | Y3 | Y3 | Y3 | Y4 | Y4 | Y1 | Y1 | Y4 | Y1 | Y4 | Y2 | Y1 | Y1 | Y4 | Y1 | Y1 | Y2 | Y4 | ||||
9 | CF | CF | SF | DF | DF | DF | DF | CF | SF | SF | SF | SF | CF | DF | SF | CF | CF | DF | DF | SF | ||||
10 | Sales | 2,060 | 2,000 | 2,050 | 1,900 | 2,040 | 1,890 | 2,000 | 1,200 | 1,210 | 2,345 | 1,100 | 1,290 | 1,110 | 1,030 | 1,040 | 1,234 | 1,050 | 1,000 | 1,060 | 987 | |||
11 | Cost | 281 | 222 | 300 | 456 | 657 | 555 | 900 | 123 | 140 | 1,290 | 110 | 345 | 170 | 120 | 145 | 343 | 160 | 111 | 180 | 123 | |||
12 | GP | 1,779 | 1,778 | 1,750 | 1,444 | 1,383 | 1,335 | 1,100 | 1,077 | 1,070 | 1,055 | 990 | 945 | 940 | 910 | 895 | 891 | 890 | 889 | 880 | 864 | |||
13 | Expense | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | |||
14 | NP | 1,679 | 1,678 | 1,650 | 1,344 | 1,283 | 1,235 | 1,000 | 977 | 970 | 955 | 890 | 845 | 840 | 810 | 795 | 791 | 790 | 789 | 780 | 764 | |||
Multiple formulas |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C10:V11,C13:V13 | C10 | =SUMIFS($C19:$AX19,$C$16:$AX$16,C$7,$C$17:$AX$17,C$8,$C$18:$AX$18,C$9) |
C12:V12,C14:V14 | C12 | =C10-C11 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
C14:V14 | Other Type | Color scale | NO |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
B2 | List | Scenario by years, Years by scenario, Most Profitable |
B3 | List | =$A$27:$A$46 |
B4 | List | =$B$27:$B$46 |
B5 | List | =$C$27:$C$29 |
B6 | List | =$E$27:$E$75 |