Forum Discussion
Spill and INDIRECT
Thank you very much for your reply, and apologies for taking my time in responding to you - I'd set it to email me when someone replied but for some reason it didn't.
Anyway, I have attached an example sheet showing what I get when I enter the formula as I think it should be. I have also added in another column trying to do the same job but using OFFSET instead of INDIRECT as mtarler suggested. Unfortunately neither were successful.
Thanks again,
Mike
- Patrick2788Nov 10, 2022Silver ContributorIt's not clear what the goal is with the formula. Is this part of a larger project?
- mtarlerNov 10, 2022Silver Contributor
OFFSET didn't work because you referenced itself H2# instead of E2#. I don't understand what you are trying to do, but here is the formula "as it is" and maybe we can talk about what you really want it to do:
=IFNA(INDEX($C$2:$C$11,MATCH(E2#,$B$2:$B$11,0)),OFFSET(E2#,-1,0))EDIT: in looking at your formula and the numbers I'm wondering if what you were trying or hoping to do is a lookup that 'holds' the previous value until it finds the next value. That is built into the LOOKUP() functions like:
=VLOOKUP(E2#,B2:C11,2)
but again we can help better if you explain what you really want/need.
- MikeB365Nov 11, 2022Copper ContributorApologies, I thought I'd been pretty thorough in my explanation but it just goes to show! However, your last suggestion of the VLOOKUP has worked and done as I wanted, so thank you very much for your help, it's much appreciated.