0

I need a little bit of help. I'm trying to create a macro. It's for hotel vacancies.

Column F2:F8 lists vacancy or occupied. Column A2:A8 lists the room numbers.

I'm trying to create a macro that will list the room numbers in a different cell, if their corresponding room is vacant. I'm truly grateful for all your help!

=concat((a2:a8)If(f2:f8,"vacant"))???
1
  • CONCAT is not a macro, It is a built in function available with Office 365 Excel. Nor is it VBA Commented Aug 25, 2017 at 19:34

1 Answer 1

1

use TEXTJOIN as it will allow the addition of a delimeter in an array form:

=TEXTJOIN(", ",TRUE,IF(F2:F8 = "vacant",A2:A8,""))

Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly then Excel will put {} around the formula.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.