I am having trouble on finding the pair match from the left table to generate the existence mapping on the right table. I have tried lookup and wildcard matches but the first column got some duplicating data so that it will just stopped after comparing the first column of data. is there any excel command that could continual compare the whole list for the most coverage?
thanks.
Perhaps following array formula may help you:
{=IF(SUMPRODUCT(($H2=$A$2:$A$12)*(IFERROR(SEARCH(I$1,$B$2:$D$12),0)>0))>0,"*","")}
Array formula after editing is confirmed by pressing ctrl + shift + enter
Related
I have an Excel book with two columns (text and numbers). The first column has a lot of variables such as 174AXX that repeat themselves.
I'm now trying to create a third column where I want to find the highest value of the second column (the one that has numbers) and that is associated with the numbers 174. Meaning that I don't want it to search for the entire word 174AXX. I want it to go to all variables that start with 174 and search the highest value.
I'm using the Max if function however when I try to use "*174*" in the formula it doesn't recognize it.
{Max(if(K:K="*174*";L:L))}
Unfortunately the Asterisk doesn't work this way in Arrays.
Instead you can use the find function like to end up with this formula:
=MAX(IF(ISNUMBER(FIND("174",K:K)),L:L))
Then press CTRL + SHIFT + ENTER
I have been working on this issue for over two hours and I am beginning to question my sanity. I have used vlookup many times in the past, but now it is just not working as expected. I am trying to replicate a LEFT-JOIN (from SQL) in Excel using vlookup.
Here is the formula I am using on cell G2:
Here is the table of all the values I want to lookup values for.
Here is the table I am using as a reference:
I am only searching one column to simplify the example. Cell G2 contains the formula which is applied to the cells under it as well. As you can see from the first image, not only is it not matching but there is some pretty weird behavior going on.
I have removed duplicates for both tables.
I have unformatted the data to plain text values
I have tried this formula on three different computers
Regardless, I keep kept getting the same result! I am starting to lose sanity.
Does anyone have any idea?
Thank you
If you want exact matches, you should be using FALSE as the last parameter
The lookup table must be sorted in ascending order. Cell A369 appears to have a value lower than the row before it, A368. There are several instances of "lower" values occurring after a higher value.
Before you go insane, consider sorting the range $A$368 thru $A$679, and see if that makes a difference.
Otherwise, time to ditch VLOOKUP, and use instead INDEX and MATCH.
Sometimes you can get the #N/A error if your lookup_value isn't "clean". If that's the case, try this formula:
=VLOOKUP(TRIM(CLEAN(A2)),$A$368:$A$697,1,FALSE)
Additionally, your table_array may have "unclean" data, so you'll need to scrub that first before you're able to find a match. To do that, use this array formula, committing it with Ctrl + Shift + Enter:
=VLOOKUP(A2,TRIM(CLEAN($A$368:$A$697)),1,FALSE)
Have you tried doing a MATCH? does it need to be VLOOKUP?
if you are happy using match try:
=IF(MATCH(A2,$A$368:$A$697,0),A2,"NO MATCH")
I have a problem that has been nagging me for a while now. I am a novice in Excel. Hence excuse me if this comes across as silly.
I have the following array of data:
I need to obtain the sum of values corresponding to the row entry "book".
I have used the formula sumif(B4:F7,"book",C4:F7). However excel returns the value in column c alone (i.e value returned is 10).
Update
I ammended my formula as follows:
I now obtained the correct sum - i.e 70. However, I deal with large volumes of data and using this formula is not efficient. Can anyone suggest a quick workaround for this?
Your guess is correct. There is a simpler way, but it is not easy to find it out for a novice user. You will need to use an array formula to do what you need.
Type this formula:
=SUM(IF($B4:$B7="book",$C$4:$F$7,0))
and enter it using Ctrl + Shift + Enter instead of just Enter
You can see the result in this picture (my delimiter is ; while yours will be ,, but that does not make a difference):
I have a 2-D array: dates on a horizontal axis and identification numbers on a vertical axis.
I want the sums conditioned on a particular date and ID, and I want to know how to do this using SUMIFS.
For some reason, it seems like I cannot since the array is 2-D while the criteria ranges are 1-D. Can anyone give me any advice on other formulas I can use?
In other words, I would like to add the values that satisfy the ID and date I select; there is one or more data point that satisfies the conditions. This is why the SUMIF function is relevant.
With this data you will not be able to use a SUMIF forumula. Here's a formula you can use:
=SUM(IF($B$2:$B$6=C9,IF($F$1:$K$1=B9,$F$2:$K$6)))
Change the addresses where appropriate and be sure and enter it by pressing CTRL + SHIFT + ENTER. You can also use the below formula to avoid pressing CTRL + SHIFT + ENTER:
=SUMPRODUCT(($B$2:$B$6=C9)*($F$1:$K$1=B9)*$F$2:$K$6)
Assuming that you're looking for an intersection of an ID and a Date, you can use the following:
=INDIRECT(ADDRESS(MATCH([ID Number],A:A,0),MATCH([Date],1:1,0)))
INDIRECT allows you to type in an address as plain text and returns the value
ADDRESS turns the numbers for rows and columns into a regular address
MATCH finds where in a row or column a given value is located.
I just wanted to add that the array version of the 2D summation in the answer above
=SUM(IF($B$2:$B$6=C9,IF($F$1:$K$1=B9,$F$2:$K$6)))
will work better if your data table $F$2:$K$6 has blanks (or other non-numeric values) because it will sum only the values that match criteria specified by $B$2:$B$6=C9 $F$1:$K$1=B9 and ignore all others.
Generally, you probably will not have blanks or other non-numeric values in your data table but I just wanted to throw this out there in case it helps someone. It certainly helped me, and I had fun playing with both 2D summation examples above. :)
I would like to lookup for a value in excel table with multiple criteria. I have tried this:
=INDEX($D$2:$D$10,MATCH(1,($B$2:$B$10=A13)*($C$2:$C$10=A13),0))
but it doesn't work.
I use this one:
=LOOKUP(2,1/(Reservation!$A:$A=$A20)/(Reservation!$B:$B=F$5)/(Reservation!$D:$D=0),Reservation!$C:$C)
... which works fine, but it's extremely slow.
Is there anyway to use index with multiple criteria?
Normally with a single criteria all you would have to do is type:
INDEX($D$2:$D$10,MATCH(A13,$B$2:$B$10,0))
And hit enter and you are done.
However, since you are using arrays inside your MATCH formula i.e. ($B$2:$B$10=A13) and ($C$2:$C$10=A13) you need to enter your formula using:
ctrl + shift + enter
If you want further reading you can see Microsoft's Guidelines and examples of array formulas