Forum Discussion
Index Match only blank cells
=IFERROR(INDEX(A$2:A$5,SMALL(IF($C$2:$C$5="",ROW($C$2:$C$5)-1),ROW($A1))),"")
This formula works in my sample file. The formula must be entered as an arrayformula with ctrl+shift+enter if someone doesn't work with Office 365 or Excel for the web or Excel 2021.
- PeterBartholomew1Jul 15, 2024Silver Contributor
You are correct that you cannot 'fill in the blanks' using a formula. After all, were you to succeed, they would no longer be blank so you wouldn't fill them in. What you could do instead, is simply read the original data, leaving it unaltered. A table with the blanks filled in could then be created somewhere else using a formula of the form
= HSTACK( Location, Code, IF(ISBLANK(SAP), XLOOKUP(Location, State, Abbreviation), SAP) )
- OliverScheurichJul 15, 2024Gold Contributor
Your are welcome. I misunderstood your question unfortunately and i'm still not 100 % sure if i understand correctly. Please check if the attached sample file works for you. All the data for the SAP column is now in column D. This could be the "helper" column. Then you can copy the whole column D and paste only values in column C.