1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Two-way XLOOKUP to return the last non-blank value at a row–column intersection

Hi,

I’m trying to retrieve the value that corresponds to a specific product (column) and year (row). Each year is broken down into months, and some of those monthly cells are blank.

What I want is for the formula to return the latest available value within a given year for a selected product—in other words, the last non-empty cell for that product within the year.

I attempted to nest an XLOOKUP for the year inside another XLOOKUP for the product, using the search mode argument to search from right to left. While this works when applied to a single data row, it returns an error when I extend the formula across the full range of data rows.

My formula: =XLOOKUP(1, (C2:Z2=B12) * (A5:A8=A12) * (C5:Z8<>""), C5:Z8, ,0,-1)

Not sure what I missed. Would appreciate any help I can get please. Thank you.

https://preview.redd.it/9dmnrkkhjlvg1.png?width=1880&format=png&auto=webp&s=27f0ab4aa67df4b208a344bc3e1386aa13f46691

submitted by /u/dr-otter2028
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#generative AI for data analysis
#natural language processing for spreadsheets
#AI formula generation techniques
#formula generator
#row zero
#rows.com
#big data management in spreadsheets
#conversational data analysis
#real-time data collaboration
#intelligent data visualization
#no-code spreadsheet solutions
#data visualization tools
#enterprise data management
#big data performance
#data analysis tools
#data cleaning solutions
#Excel compatibility
#Excel alternatives
#XLOOKUP