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"))???
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.
Related
My table updated
See if this picture of my table helps understand what I am trying to do. Thank you. B1 is where I am trying to return the column C count. I do have some duplicates in column B (as mentioned with previous table).
Use this array formulas to count the uniques:
=SUM(IF(B1:B8=0.5,1/COUNTIFS(A1:A8,A1:A8,B1:B8,0.5)))
Being an array formula it must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly then Excel will put {} around the formula.
I would like to use a lookup formula to bring back multiple values. For example when it finds more than value in a look up I would like excel to add each value in the adjacent columns.
Can anyone help?
see attached
You can use this array formula:
=IFERROR(INDEX($B$2:$B$13,MATCH(1,($A$2:$A$13=$H$2)*(COUNTIF($H$2:H$2,$B$2:$B$13)=0),0)),"")
Being an array formula, put it in the first cell then hit Ctrl-Shift-Enter instead of enter when exiting edit mode. If done correctly then Excel will put {} around the formula.
Then copy/drag across enough columns till you get blanks.
You can also use this formula :
=IFERROR(INDEX($B$2:$B$13,SMALL(IF($H2=$A$2:$A$13,ROW($A$2:$A$13)-ROW($A$2)+1),COLUMN(A2))),"")
As this is also an array formula, press Ctrl+Shift+Enter while entering the formula.
Check out the selection in the top right, columns "Purchase/Sale" and "NOI".
I'd like to add these two columns and insert the sum for each period in their respective space. Is there I can link the sum of the columns and add the sum to the row?
In other words, I'd like the cells to link so I would have the following result:
Thank you
Use this array form of VLOOKUP wrapped in SUM():
=SUM(VLOOKUP("CF" & G1,$A$2:$C$7,{2,3},FALSE))
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter when exiting edit mode instead of Enter. If done correctly then Excel will put {} around the formula.
I want to use the Index formula to list data in my excel sheet.
I want to list the data of the column A that contains "finished" in the corresponding cells in column E.
Currently I'm using the following formula:
=INDEX(IMs!A:A;MATCH("finished";IMs!E:E;0))
The problem is, only the first value appears. I want to list ALL of them.
Is it possible with the vlookup formula?
Thank you very much in advance.
Kind regards,
Vanessa
First enter this formula in B1:
=COUNTIF(IMs!$E:$E,"Finished")
Then enter this array formula** in your first cell of choice:
=IF(ROWS($1:1)>$B$1,"",INDEX(IMs!$A$1:$A$1000,SMALL(IF(IMs!$E$1:$E$1000="finished",ROW(IMs!$E$1:$E$1000)-MIN(ROW(IMs!$E$1:$E$1000))+1),ROWS($1:1))))
Copy this formula down (though not the one in C1) until you start to get blanks for the results.
If the upper row reference that I chose (1000) is not sufficiently high, then change it as required. Note, however, that since this is an array formula, it is not recommended that you make this upper bound too high (and certainly don't reference entire columns!), since this will have a significantly detrimental effect on spreadsheet performance.
From your post, it also appears that you are using a version of Excel in which the argument separator in formulas is not the comma but the semi-colon. If this is indeed the case then you will need to make the necessary amendments to the formulas I provided.
Regards
**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
I am using Excel to do some dot product between two row vectors:
=MMULT(B1049:M1049, TRANSPOSE(B1050:M1050))
But it does not work, as the cell for the formula shows "#VALUE!". I wonder why? Thanks!
Note that all the cells in "B1049:M1049" and "B1050:M1050" are numbers.
PS: Is this question more suitable here or Superuser?
probably simpler, you can just use =SUMPRODUCT(vec1,vec2).
This is exactly the Euclidean inner product, without resorting to array formulas.
you need to enter MMULT as an array formula, not as a standard formula
rather then hit enter when you type the formula in pres
ctrl-shift-enter
and excel will enter it as an array
it will end up looking like
{=MMULT(B1049:M1049, TRANSPOSE(B1050:M1050))}
(please note you can't enter the {} manually)
You may want to look at Excel help which covers this well