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.
Related
I have an array formula in a cell. This formula displays the line number of a cell at the condition that the cell contains "FAIL" (and displays the line numbers with a coma separator). I wanted to add another condition to this formula so I tried to use AND but it now doesn't work anymore and I don't know why.
The original IF that worked looks like that:
IF(Y23:Z6000="FAIL";ROW(Y23:Z6000);"")
And what I want to write is
IF(AND(Y23:Z6000="FAIL";NOT(ISBLANK(A23:A6000));ROW(Y23:Z6000);"")
I have also tried with A23:A6000<>"" but same outcome.
The whole formula is this one:
{=TEXTJOIN(",";TRUE;IF(AND(Y23:Z6000="FAIL";NOT(ISBLANK(A23:A6000)));ROW(Y23:Z6000);""))}
Can you please help me figure out what I did wrong? Thanks in advance.
Array formulas do not like AND or OR Either nest IFs or use * or + respectively:
=TEXTJOIN(",";TRUE;IF((Y23:Z6000="FAIL")*(NOT(ISBLANK(A23:A6000)));ROW(Y23:Z6000);""))
Array formulas require confirmation with Ctrl-Shift-Enter instead of Enter when exiting edit mode.
I'm having trouble phrasing my question, so here's a screenshot. Basically I want G2 to be a field I can copy and paste into a field on a website for billing purposes. The TEXTJOIN function is the closest I've gotten to making this work but it still isn't right. I'm having the following problems:
The price of each fruit loses its ending 0's during concatenation
I intend to keep adding more fruits, but =TEXTJOIN(E:E) includes E1 which is obviously the heading
The resulting string in G2 isn't copy-and-paste-able without first copying and selecting Paste Value within Excel
Screenshot for reference:
I might not be able to avoid the last problem without VBA but I'd like to at least navigate around the first 2 issues. I suppose creating a button that would output G2's value to a Notepad document would work as well, or something along those lines.
In E2 put:
=A2&"("&TEXT(D2,"$#,##0.00")&")"
to do the concatenation.
Then just specify the start in E2:
=TEXTJOIN(", ",TRUE,E2:E1040000)
Also you can skip the helper columns with the following array version of TEXTJOIN:
=TEXTJOIN(", ",TRUE,$A$2:INDEX(A:A,MATCH("zzz",A:A))&"("&TEXT($D$2:INDEX(D:D,MATCH("zzz",A:A)),"$#,##0.00")&")")
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.
When you copy a cell to the clipboard and paste it anywhere but Excel it should only paste the text, but that may depend on the website also.
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 found this formula : =COUNTIF(D$2:D$60000,">"&D2)+1 that gives me ranking of some data but it skips values like in the picture
is there any solution to solve this problem like to have a normal ranking without skiping values , thanks
This array formula will do it:
=SUM(IF((D$2:D$60000>D30)*(D$2:D$60000<>""),(1/(COUNTIF(D$2:D$60000,D$2:D$60000)))*(D$2:D$60000>D30)))+1
Being an array formula it needs to be entered with Ctrl-Shift-Enter when leaving edit mode. If done correctly 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).