Complex Array Adjustment

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I adjusted the formulas for column A which made it easier:


Book1
ABCDEFGHIJ
1AprMayJuneJulyAugustSeptember
2Q2Q2Q2Q3Q3Q3Total
3100Burger King5050
4101KFC6080100240
5102McDonalds504090
6103Subway102030
7104Wimpy52.57.5
8
9
10
11
12ClientsQ2< Change this to Q3 for an example
13100Burger King50
14101KFC80< Formulas Here in A/B/C
15102McDonalds50
16103Subway20
17
18AprMayJuneJulyAugustSeptember
19Q2Q2Q2Q3Q3Q3Total
20100Burger KingUK5050
21105KFCUK
22101KFCIRE6080100240
23107McDonaldsIRE
24102McDonaldsUK504090
25114McDonaldsUK
26103SubwayUK102030
27104WimpyIRE52.57.5
28
29ClientsQ2
30100Burger King50
31102McDonalds50
32103Subway20
Sheet1
Cell Formulas
RangeFormula
B13=IF($A13="","",VLOOKUP($A13,$A$3:$B$7,2,0))
B30=IF($A30="","",VLOOKUP($A30,$A$20:$B$27,2,0))
A13{=IFERROR(INDEX($A$3:$A$7,SMALL(IF(SUMIFS(OFFSET($C$3:$H$3,ROW($A$3:$A$7)-ROW($A$3),0),$C$2:$H$2,$C$12)>0,ROW($A$3:$A$7)-ROW($A$3)+1),ROWS($A$13:$A13))),"")}
A30{=IFERROR(INDEX($A$20:$A$27,SMALL(IF($C$20:$C$27="UK",IF(SUMIFS(OFFSET($D$20:$I$20,ROW($A$20:$A$27)-ROW($A$20),0),$D$19:$I$19,$C$29)>0,ROW($A$20:$A$27)-ROW($A$20)+1)),ROWS($A$30:$A30))),"")}
C13{=IF($A13="","",MAX(IF($C$2:$H$2=$C$12,IF($A$3:$A$7=$A13,$C$3:$H$7))))}
C30{=IF($A30="","",MAX(IF($D$19:$I$19=$C$29,IF($A$20:$A$27=$A30,$D$20:$I$27))))}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,283
Members
449,075
Latest member
staticfluids

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