Column and Row lookup, skip if blank

mattyblueice

Board Regular
Joined
Jul 24, 2014
Messages
87
Office Version
  1. 365
Platform
  1. MacOS
I have a table of data with months in the column header and rows for different depts. This is a simplified sample of what I am working with, but what I am trying to do is to have a formula look at a cell with that has the current month, scan the data in that month and if there is a value, ie Dept bring in that Dept name and then keep scanning the data set and bringing in values for depts with values in the current month. I have been researching how to do this with Index and Match with no luck. Any ideas would be great. Thank you.

1714657077323.png
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
try this;
(for dates, I used date values formatted as month and year)
Book1
ABCDEFGHIJKLMN
1DeptJan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24Nov-24Dec-24Jan-25
2Admin600
3IT4003001000
4Exec400
5Finance1000
6Sales
7
8Current MonthApr-24
9
10DeptApr-24
11Admin600
12IT300
Sheet2
Cell Formulas
RangeFormula
A10:B12A10=LET(a,CHOOSECOLS(A1:N6,1,MATCH(C8,A1:N1,0)),b,CHOOSECOLS(a,2),FILTER(a,b<>0,""))
Dynamic array formulas.
 
Upvote 0
Solution
Thank you for this I have never tried to use a variable to solve a problem in Excel, thank you so much! :)
 
Upvote 0
You're welcome. Thanks for the feedback. There is probably a more succinct formula but this seems to work for your need.
 
Upvote 0

Forum statistics

Threads
1,216,045
Messages
6,128,484
Members
449,455
Latest member
jesski

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