MATCH Function Returns Unexpected Result
Dec 3, 2013
In the attached file I used =MATCH(TRUE,INDEX($B$2:$B$10="",0)) to retrieve the location of the first empty cell.
When using the "Evaluate Formula" tool, it is clear that the position in the array created by the INDEX function is the 6th. Nevertheless, the final outcome is 9, being the last cell in range.
View 3 Replies
ADVERTISEMENT
Mar 11, 2014
I am having some trouble getting a formula to work. I am building a report that pulls figures from a pivot table in another workbook. I am using a vlookup with match function to get the column index to find the relevant data I want. Where I need to add two columns together I am using sum, with the vlookup & match formulas nested in them e.g.:
=SUM(VLOOKUP(F13,'[PIVOT 156.xlsx]PIVOT'!$C:$AQ,MATCH("FAID",'[PIVOT 156.xlsx]PIVOT'!$C$6:$AQ$6,0),FALSE),VLOOKUP(F13,'[PIVOT 156.xlsx]PIVOT'!$C:$AQ,MATCH("COMM",'[PIVOT 156.xlsx]PIVOT'!$C$6:$AQ$6,0),FALSE),VLOOKUP(F13,'[PIVOT 156.xlsx]PIVOT'!$C:$AQ,MATCH("BPCM",'[PIVOT 156.xlsx]PIVOT'!$C$6:$AQ$6,0),FALSE),VLOOKUP(F13,'[PIVOT 156.xlsx]PIVOT'!$C:$AQ,MATCH("COMD",'[PIVOT 156.xlsx]PIVOT'!$C$6:$AQ$6,0),FALSE))
Where:
F13 = Employee number
Column C on the pivot 156 workbook is where the employee number is based.
The Match formula is then getting the column index from the column headings of the pivot table ie. "FAID"
This in itself works fine, as long as it finds a match in the column headings. This is where i get the error as in the above function "COMD" is not in the pivot table. However I need to keep it included as it may appear on a future pivot table. Is there a way of getting the sum function to complete even though later in the formula it can't complete the vlookup? So it will ignore it, or assume the value is zero if it can't find it? The formula probably needs to do this for all the vlookups as some headings may drop off in future pivot tables.
View 2 Replies
View Related
Jan 28, 2010
I have this COUNTIFS expression buried in a larger formula:
COUNTIFS(Table[C7],Table[C7]&"",Table[C21],">=1")
and it always returns a value of zero or some positive integer.
I'm now looking for a little "function" that I can wrap around this expression that will:
A) indicate any non-zero result as 1 or TRUE
and
B) indicate any zero result as 0 or FALSE
Something like...
AREYOUNONZERO( (COUNTIFS(Table[C7],Table[C7]&"",Table[C21],">=1") )
I'm sure there's a fairly efficient way to do this... but I'm totally stumped at the moment!
View 7 Replies
View Related
Aug 22, 2012
I'm compiling a list of names on a separate tab from a column that only lists the names sporadically. Problem: In the formula, the IF provides a TRUE, the row function, and consequently, the INDEX function (when I hit F9) provides the correct "name" and row number, but when I hit return, it provides the text 4 cells beneath what it should.
=IF(ROWS(F$5:F5)
View 7 Replies
View Related
Jul 21, 2009
I'm using the following formula to calculate the % relative standard deviation of 5 values:
ROUND((STDEV(C8:C12)/AVERAGE(C8:C12)*100),6)
where C8 through C12 are all 3.48.
I was surprised to see the result of 0.000002, and not 0.000000. This formula seems to be accurate to 6 decimal places when using 5 values that are not all the same. When they are the same, I get this small discrepancy in the 6th decimal place. I attempted to troubleshoot by inspecting C8 through C12. The values were typed in as seen above (3.48) and the cell formatting is set to 2 decimals in each of these cells, so the cells themselves shouldn't be contributing to the issue.
View 9 Replies
View Related
Apr 18, 2006
I am using the find method to search column headings, and based on the results copy the column to another worksheet. Everything works fine except if I have a mixed text and numeric string in the cell, for example DT35. In this case the macro doesn't copy this column. I have attached the spreadsheet. CTRL - A will run the macro. The macro calls a form with checkboxes, captioned using the values in the worksheet titled "Set-Up". If a value is found in the column heading the checkbox is set to true, then when the "Copy Selected Columns to Final Sheet" button is selected the columns are copied to the "FinalSheet" worksheet. I tried using xlPart instead of xlWhole, and this works but I need to search for exact strings so xlPart isn't a great work around.
View 4 Replies
View Related
May 27, 2007
If I create a simple conditional statement in a cell:
=IF(A8="NX-QSNT",B8, "")
I get the expected B8 cell contents when "NX-QSNT" exists in A8, or blank when it doesn't.
If instead of qualifying this full string, I try to Search for the "-QS" string in that cell as the criteria:
=IF(SEARCH("-QS",A8),B8, "")
I get the expected B8 cell contents when "NX-QSNT" exists in A8, but I get "#VALUE!" if it does not find this "-QS" string.
I'm guessing it may be because SEARCH isn't actually returning a TRUE/FALSE response, but rather, a numeric one based on the position of "-QS". I tried using a numeric approach also, but this didn't help:
=IF(SEARCH("-QS",A8) > 0,B8, "")
View 9 Replies
View Related
Mar 16, 2009
If a INDEX,MATCH function returns a zero, how do I get it to use the value in the adjacent cell which is a unique number?
=INDEX(Sheet2!A:C,MATCH(A2,Sheet2!A:A,0),3)
Example:
View 2 Replies
View Related
Mar 20, 2014
I need some code to search "database" sheet column B:B for value "SearchString" and then either select the cell (0, 86) to the right or count the rows so I can move the the cell in the correct row.
View 14 Replies
View Related
Jul 27, 2014
I have a two different formulas the return a numbered result(PO Number) in the same column. I then vlookup both of them with the same formula into a pivot table, one returns the result one doesn't. format appears to be the same.
View 6 Replies
View Related
Jan 31, 2014
Code: =VLOOKUP((LEFT(C4,6)),'Data from 7500'!$B$16:$G$195,6,TRUE)
And it works great, except that the data returned is off by one row. For example, the correct value for the sample name in B107 is located in G107, but the formula returns the value in cell G106. I've tried changing the TRUE to FALSE and that returns #N/A.
View 5 Replies
View Related
Dec 1, 2009
I have created a table in excel, and it has a very simple sum totals. When i include all cells in the table the total becomes 0. When I exclude a cell in the table, the total shows. I have deleted the row and re inserted another one and copied the cell content from above that was not having a problem,
View 9 Replies
View Related
Dec 29, 2008
I have a worksheet called "Raw Data" where in columns J, I and G contain values. I would like to write a formula whereby if all 3 conditions are met, it will count the number of values found in column C.
I've tried to write an IF statement but it just returns FALSE, despite the result being true. Need the right combination of IF/AND statements that would do this?
=IF(AND('Raw Data'!$J:$J="Maintenance",'Raw Data'!$I:$I="Open",'Raw Data'!$G:$G="1-2008"),COUNT('Raw Data'!$C:$C)). I've tried to attach the workbook, but there's a problem with uploading attachments I think. Sorry if my explanation is unclear.
View 4 Replies
View Related
Jan 18, 2006
I have a simple formula subtracting one cell from another using =SUM(XX,-XX). When I click on fx and bring up the function arguments box, the formula result is displayed correctly in that box. However, the cell containing the formula will only display a zero. I have tried reformatting the cells to no avail. I have also tried getting a result using =XX-XX and that does not work either.
View 10 Replies
View Related
Mar 18, 2007
I have a three or four letter abbreviation of a last name in A1. Column C contains a list of Last Names; column D contains a list of corresponding First Names; and column E contains a formula concantenating the First Names and Last Names from columns C & D.
I have the following formula in B1:
=VLOOKUP(A1,C1:E44,3,1)
I am attempting to match up the three or four letter abbreviation with the concatenated list to return the full name (First and Last) in cell B1, however, I'm not getting the desire result. I keep getting the name in the row just above the name I want.
View 9 Replies
View Related
Jul 21, 2006
I have discovered a strange thing about excel and it is driving me mad and ruining my project.
Basically, If i enter the number 97.4 into cell A1 and then 97.165 into cell B1 and then enter the formula =A1-B1 into cell C1 i get the answer 0.235. Which is correct.
However, when you increase the number of decimal places to 30 the answer that is returned is 0.234999999999999000000000000000.
This calculation result seem to fluctuate wildly depending on the primary numbers in cells a1 and b1. Very rarely have i seen the full 30 decimal places without a bizarre result like this.
Maybe it has been too many years since i was at school and that i am confused with my numbers and that there is a real easy answer to why this result is returned.
As i said it is ruining my project that i am working on. Can anyone help? Why does excel do this? Is there a way to stop this happening? My project relies on this answer to be correct. Is there a way to force excel to stop doing this?
View 9 Replies
View Related
Feb 15, 2007
I need a formula to count cells based on the date, so that I can have a blank cell when the answer is 0. I am adding values cumulative and future cells need to be blank because I have a graph that has a trend line and I don't want the trend line to fall off at the end. I also don't want to have to go back to this every month and update it.
Column A
Date
1/2/2007 0:00
1/3/2007 0:00
1/10/2007 0:00
2/10/2007 0:00
2/10/2007 0:00
2/15/2007 0:00
3/22/2007 0:00
3/22/2007 0:00
3/22/2007 0:00
4/31/2007 0:00
4/31/2007 0:00
4/31/2007 0:00
Column B
Invoice #
CM-0003881
CM-0003882
CM-0003883
CM-0003888
CM-0003928
CM-0003932
CM-0003933
CM-0003985
CM-0004007
CM-0004008
CM-0004009
CM-0004065
I have this formula in cell F3 that will add the dates through the end of January:
=SUMPRODUCT((A1:A1000>=DATEVALUE("1/1/2007"))*(A1:A1000
View 10 Replies
View Related
Apr 3, 2008
I have 2 tables, 1 beneath the other - table 1 columns represent date ranges and their values. Columns and their data are alternating color coding. Table 2 references, by means of array formula, this data - IS it possible to include the font color as a result?
BCDEFGH503/0310/0317/0324/03609/0316/0323/0330/03712348Prod113,91113,69713,58213,4849Prod21,9241,8943,1151,86510Prod31,2601,2401,2301,22121Age (Days)22Prod1211391123Prod22624Prod326
Formula in H22 = '{=SUMPRODUCT(((H$5-$D22)>=$E$5:$O$5)*((H$5-$D22)
View 9 Replies
View Related
May 14, 2013
Function Haversine has correct value in debugger but in cell it has the same value as Haversine2. Is this a known bug?
Public Function Haversine(lat1 As Double, long1 As Double, lat2 As Double, long2 As Double) As Double
Dim temp As Double
[Code]....
View 9 Replies
View Related
Nov 20, 2013
I am looking up a risk matrix to return the risk rating... it is very simple, it works on one sheet, but on a different sheet (looking up different data, but same basic format) it returns exactly the opposite rating.
My formula is: =INDEX($G$6:$K$10,MATCH(I19,$G$5:$K$5,0),MATCH(J19,$F$6:$F$10,0))
Here is F4 to K10
I have data validation on I19 and J19 based on the cells below
Consequence
Priority
Very Low
Low
Medium
High
Very High
[Code] ..........
BUT... when I put Very Low and Very Low in the two cells (I19 and K19) I get Very High as the return.
View 1 Replies
View Related
Dec 24, 2007
agentsIDCount Name1ACCT1Name2ACCT2
Joe1113
Jimmy2222
Sarah3333
The above is A1 thru G1.
I have a list of accounts on Sheet2 that have the agent ID's (listed on K:K), Acct #s listed D:D and names E:E.
I want to match Sheet1 B2 with Sheet2 K$1$:K$50000$. I want to return the first match under this ID from Sheet2 Column E (to post on 1 Name on sheet 1) and then Column D (to post on 1 Acct# on sheet 1).
Then the next match goes to 2 name, 2 acct # and so on.
View 9 Replies
View Related
Aug 30, 2007
In the attached spreadsheet I'm using VLOOKUP to create a cross reference between worksheets JS and ITEM. If you will look at the ITEM worksheet cell reference H13 & H14. The correct value for H13 should be AMC, not 729. Is there a way to use the value in the Class column and Item ID column in combination to get the value AMC? Would MATCH & INDEX work? I'm not familiar with Match & Index. I'd appreciate some help here. I've got 15,404 records to evaluate this way.
View 14 Replies
View Related
Aug 7, 2009
I have the following formula that returns a number, however it returns the first number it comes to when the criteria is met,
View 2 Replies
View Related
Dec 8, 2006
On the attached spreadsheet A14 and B20 appear the same but VLOOKUP returns N/A. The CELL "FORMAT" function returns "G" for both cells, but the "EXACT" function returns FALSE. If somebody could explain what is causing them to be different I woud be extremely grateful.
View 5 Replies
View Related
Feb 18, 2013
I want a UDF; = OK (f1,f2) each argument being an alternative function. If f1 returns an error message then use f2. Should be easy but I cannot get it to work.
View 5 Replies
View Related
Dec 15, 2009
i have weights entered in A1 , B1 , C1 and I manually enter almost same weight in D1, E1, F1 . Now I need the result as " OK " in G1 if the weights A1,B1,C1 match with D1,E1,F1 if it doesn't match then result should give "Please check again".
View 9 Replies
View Related
Dec 26, 2013
In column D I have the time of the end of my shift. When I try to input =MIN(1;$D:$D) in column E, i get the same answer (0,625) for any row, while =$D:$D gives correct values. So I guess it has something to do with the MIN function
View 10 Replies
View Related
Aug 1, 2008
Have a spreadsheet prepared by someone else on older Excel version exported from database. The sum and count functions work fine both vertically and horizontally, but trying to add selected cells returns #VALUE! Attached is small range of 50-col x 2500 row spreadsheet. Original content is highlighted in yellow. See cell E2. I assume the forumula is seeing number content as text. How do I convert the entire spreadsheet to numbers.
View 3 Replies
View Related
Oct 2, 2009
I'm trying to do a formula that references a cell and returns a different result dependant on the number in the cell being referenced.
For example I've said if A1 has a 3 in it then put the word TEST as the result, plus if it has a 4 put the word RESULT.
What I wrote as my formula is as follows-
=IF(A1=3,"TEST")+IF(A1=4,"RESULT")
It works fine when I only use one result but goes wrong when I add two. If I change the words I want to show to numbers it comes up fine but with words it just returns a Value error.
View 2 Replies
View Related
Jan 24, 2007
I am working on a Monthly Vehicle Spread Sheet. One of the outputs I am trying to achieve is an automatic calculation of Mile Per Gallon. To do this, I need to know if there is a function that will return the value of the first entry of a group of cells.
In calculating the miles per gallon, I need to subtract the first gallon amount entry of the total gallons in the month, then divide that number into the difference of the mileage in the month recorded when the vehicles fueled up.
View 11 Replies
View Related