0

Sorry, not too good with Excel, but what I am trying to achieve is this vlookup located in sheet1 cell R7:

=VLOOKUP(F2,config!F2:H20,3,FALSE)

Which displays a room number, e.g. 1

However, if the room already exists in the column, I want it to find another value in the VLOOKUP that doesn't already exist in the column.

I check if it exists in the column by using (located in sheet1 cell R8):

=COUNTIF(E2:E20,R7)>0

So if this query is FALSE, then it's ok to use the VLOOKUP above, but if it returns TRUE it should keep searching until it finds one that is FALSE.

Sheet1:

enter image description here

config sheet:

enter image description here

Hope this makes sense

  • Can you post some example data and/or screenshots? It's hard to work out a solution without being able to look at the setup. Also, what column are those two formulas in? – Alex M Apr 2 at 17:30
  • 1
    added pictures, sorry – user1472266 Apr 2 at 17:47
  • Where is this formula =VLOOKUP(F2,config!F2:H20,3,FALSE) located? Please edit your question to include all information necessary to reproduce a mockup of what you're doing and what you're trying to do. – Alex M Apr 2 at 17:54
  • Sorry, I've wrote where they are located – user1472266 Apr 2 at 18:45
  • 2
    Hm. OK. Now I think you have an XY problem. meta.stackexchange.com/questions/66377/what-is-the-xy-problem because I'm not at all clear on what you're trying to DO. In R7 and R8 for some reason you want to run a procedure one time? Against F2 specifically? And F2 is 'Yes' or 'No', and you want to compare it to a Y/N list in F:F of config sheet..? This isn't making sense to me, sorry. I think you need to back up a step (or two) and actually describe what your goals are, rather than asking for help with a particular formula that you've tried. – Alex M Apr 2 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.