Not sure where to start...

Hartley16

New Member
Joined
Aug 23, 2021
Messages
5
Office Version
  1. 365
Platform
  1. MacOS
Hi, I'm hoping someone here can help me. I am trying to return the cells that have a value in column A if R1 matches with the corresponding table header. I think an array index match formula is the way to go but I can't seem to get my head around it.
 

Attachments

  • Screenshot 2021-08-23 at 20.07.49.png
    Screenshot 2021-08-23 at 20.07.49.png
    164.5 KB · Views: 11

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi & welcome to MrExcel.
Do you mean te values from col A where col C has a value?
 
Upvote 0
Welcome to MrExcel!

Your question is not entirely clear, but maybe something like this?

Book4
ABCDEFOQRS
1Shop StockBack FridgeBack of ShopCloakroomCounterDrinksBack of ShopCount
2A5001A15
3B1B
4C1C
5D251D
6E251E
7F251F
8G251G
9H1H
10I1K
11JL
12K5001M
13L1000N
14M16O
15N16Q
16O2.5S
17P
18Q50
19R
20S1
21T1
Sheet3
Cell Formulas
RangeFormula
R2:R16R2=FILTER(A2:A21,INDEX(B2:F21,0,MATCH(R1,B1:F1,0))<>"")
S2S2=ROWS(R2#)
Dynamic array formulas.
 
Upvote 0
Solution
Welcome to MrExcel!

Your question is not entirely clear, but maybe something like this?

Book4
ABCDEFOQRS
1Shop StockBack FridgeBack of ShopCloakroomCounterDrinksBack of ShopCount
2A5001A15
3B1B
4C1C
5D251D
6E251E
7F251F
8G251G
9H1H
10I1K
11JL
12K5001M
13L1000N
14M16O
15N16Q
16O2.5S
17P
18Q50
19R
20S1
21T1
Sheet3
Cell Formulas
RangeFormula
R2:R16R2=FILTER(A2:A21,INDEX(B2:F21,0,MATCH(R1,B1:F1,0))<>"")
S2S2=ROWS(R2#)
Dynamic array formulas.
Thanks Eric, that's exactly what I was looking for!
 
Upvote 0
Glad we could help! Thanks for the update. :biggrin:
I now need to return the appropriate value for each item into column S so S2 should be 500, S3 should be 1 etc. What formula could I use for this?

Thanks for your help, I'm new to this :)
 

Attachments

  • Screenshot 2021-08-23 at 20.49.58.png
    Screenshot 2021-08-23 at 20.49.58.png
    154.4 KB · Views: 7
Upvote 0
This should work:

Book4
ABCDEFOQRST
1Shop StockBack FridgeBack of ShopCloakroomCounterDrinksBack of ShopCount
2A5001A50015
3B1B1
4C1C1
5D251D25
6E251E25
7F251F25
8G251G25
9H1H1
10I1K500
11JL1000
12K5001M16
13L1000N16
14M16O2.5
15N16Q50
16O2.5S1
17P
18Q50
19R
20S1
21T1
Sheet3
Cell Formulas
RangeFormula
R2:S16R2=FILTER(CHOOSE({1,2},A2:A21,INDEX(B2:F21,0,MATCH(R1,B1:F1,0))),INDEX(B2:F21,0,MATCH(R1,B1:F1,0))<>"")
T2T2=ROWS(R2#)
Dynamic array formulas.


This can be shortened a bit with LET, but Fluff will have to help you with that if you're interested, since my version of Excel doesn't have LET yet.
 
Upvote 0
Using 'Let'.

ExpandIP.xlsm
ABCDEFGNOPQRST
1Shop Stock Back FridgeBack of ShopCloakroomCounterDrinksBack of Shop#Count
214 x 111500114 x 1150015
320L Liquid Oil120L Liquid Oil1
420x24 chip wrap120x24 chip wrap1
54 oz cups2514 oz cups25
64 oz lids2514 oz lids25
77 oz cups2517 oz cups25
87 oz lids2517 oz lids25
9Antu Bac Spray1Antu Bac Spray1
10Anything Extra (No VAT)1B/Fish 1 Bag500
11Anything Extra (VAT)B/Fish 4&51000
12B/Fish 1 Bag5001Batter - A116
13B/Fish 4&51000Batter - Goldensheaf16
14Batter - A116Batter -GF2.5
15Batter - Goldensheaf16Bio Box Small50
16Batter -GF2.5Black Sacks1
17Beef & Onion PueTotal:2188.5
18Bio Box Small50
19Bio Burger Box
20Black Sacks11
21Bleach
Sheet11
Cell Formulas
RangeFormula
R2:S17R2=LET(a,A2:A21,c,INDEX(B2:F21,,MATCH(R1,B1:F1)),tbl,FILTER(CHOOSE({1,2},a,c),c>0),IFERROR(INDEX(tbl,SEQUENCE(ROWS(tbl)+1),{1,2}),CHOOSE({1,2},"Total:",SUM(c))))
T2T2=COUNT(R2#)-1
Dynamic array formulas.
 
Upvote 0
Another option
+Fluff 1.xlsm
ABCDEFGQRS
1Shop StockBack FridgeBack of ShopCloakroomCounterDrinksBack of Shop
2A5001A500
3B1B1
4C1C1
5D251D25
6E251E25
7F251F25
8G251G25
9H1H1
10I1K500
11JL1000
12K5001M16
13L1000N16
14M16O2.5
15N16Q50
16O2.5S1
17P
18Q50
19R
20S1
21T1
22
23
Data
Cell Formulas
RangeFormula
R2:S16R2=LET(Fltr,FILTER(A2:F21,(COLUMN(A1:F1)=1)+(COLUMN(A1:F1)=MATCH(R1,A1:F1,0))),FILTER(Fltr,INDEX(Fltr,,2)<>""))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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