So I have a spreadsheet like this:
I'm trying to run this formula to get the value from "Total Income" under the -Call Centre header
These are the values from the NAME_INPUT sheet:
B71 = A1:AJ39 D71 = E1:E39
This is the formula which is finding result 0:
=ROUND(INDEX(INDIRECT("'QB IS by class'!" & NAME_INPUT!B71),MATCH("Total Income",INDIRECT("'QB IS by class'!" & NAME_INPUT!D71)),MATCH("-Call Centre",'QB IS by class'!1:1,0))/1000,0)
I know the formula is written correctly, because if I change "Total Income" to "PIEFACE", it'll match and give me the correct value.
Why does the string, "Total Income" cause it to have zero results. I don't see any other fields under E column with the name, "Total Income".
Even if I use, "Total Expense" that will get the correct value under -Call Centre for that row... So why does "Total Income" fail to give me a result?
The field types are all the same.
Thanks guys
Although your data isn't clear, but I think you are doing an Exact Match so you forgot the third parameter 0 for the first MATCH in the formula:
MATCH("Total Income",INDIRECT("'QB IS by class'!" & NAME_INPUT!D71))
The above term should be
MATCH("Total Income",INDIRECT("'QB IS by class'!" & NAME_INPUT!D71), 0)
^^^^
and the whole formula:
=ROUND(INDEX(INDIRECT("'QB IS by class'!" & NAME_INPUT!B71),MATCH("Total Income",INDIRECT("'QB IS by class'!" & NAME_INPUT!D71), 0),MATCH("-Call Centre",'QB IS by class'!1:1,0))/1000,0)
^^^
Try substituting MATCH(CONCATENATE("*"&"Total Income"&"*")) in for MATCH("Total Income"
Related
I am trying to replace 558899 this Id number from below URL with cell value that is ID_NO = ws.Range("A1").Value.
"15.156.352.352/api/Book/GetOrBookID?Id=558899&ColumnName=PrimaryId"
and i changed it to
"15.156.352.352/api/Book/GetOrBookID?Id=" & ID_NO & "ColumnName=PrimaryId"
But it does not work nay help will be appreciated.
Your question doesn't mention what the bad result is, but I can see one issue in your code:
"15.156.352.352/api/Book/GetOrBookID?Id=" & ID_NO & "ColumnName=PrimaryId"
When this is parsed, it will result in:
"15.156.352.352/api/Book/GetOrBookID?Id=xxxxColumnName=PrimaryId"
But I think you want:
"15.156.352.352/api/Book/GetOrBookID?Id=xxxx&ColumnName=PrimaryId"
So the code you need is:
"15.156.352.352/api/Book/GetOrBookID?Id=" & ID_NO & "&ColumnName=PrimaryId"
Im guessing that the cell value is formatted as a number(long). therefore you could try replacing ID_NO with str(ID_NO) to convert it to a string
I am trying to use the „MATCH“ function in order to get the Row (named RICRow) number of a name which is contained in the “RIC“ column (A). Because there are always two names in the RIC column (e.g.”Tom”) it is necessary to take the column(L) “RIC_FID” into consideration which contains a unique value corresponding to the names (e.g. 295). The VBA code below keeps yielding the error msg: type mismatch
RICRow = Application.WorksheetFunction.Match(RIC & RIC_FID, protokoll.Range("A1:A500") & protokoll.Range("L1:L500"), 0)
this one solved the issue:
RICRow = protokoll.Evaluate("match(""" & RIC & "" & RIC_FID & """, A:A&L:L, 0)")
I am trying to create an If statement in Excel that calculates the difference between two dates (in this case "Required Submission Date" and "Actual Submission Date"), and then outputs the absolute value of this number and follows it with "Days overdue" or "Days until due" accordingly.
I have attempted converting the number to a text string after the calculation:
=IF((H11-J11)<0,TEXT(H11-J11,0)"Days overdue", TEXT(H11-TODAY(),0)"Days Until Due")
I have also attempted this:
=IF((H11-J11)<0,abs(H11-J11)"Days overdue", (abs(H11-TODAY()))"Days Until Due")
Is there any way to achieve what I am after? i.e. if the submission is overdue, it should return "XX days overdue"
Thanks
You are almost there. It should be :
=IF((H11-J11)<0,abs(H11-J11) & " Days overdue",(abs(H11-TODAY())) & " Days Until Due")
In fact you are just missing the string concatenation character &.
Working in Microsoft Excel, I have a spreadsheet with the equivalent of a shopping list, if the Quantity is greater than 0 then I wish to display the description on another sheet.
This is something that is quite simple using the INDEX function, however this only returns the first value that matches.
How should I re-factor the query below, to return the value of (n)
=INDEX(Software!B23:Software!B34,MATCH(TRUE,INDEX(Software!A23:Software!A34<>0,0),0))
Having assumed this to be an array, I mistaking thought I could call Array[n] for the location, however this has proven incorrect.
Thank you for your assistance.
In this case, you don't want to use MATCH(), you want to use the SMALL() and IF() functions together...
=INDEX(Software!$B$23:$B$34,SMALL(IF(Software!$A$23:$A$34>0,ROW(Software!$A$23:$A$34)),ROW(A1))-ROW(Software!$B$23)+1)
Entered as an array formula
Basically, what you're saying is:
Give me the row for which the data in Column A > 0 for the Kth smallest time
Now take that row and subtract from it the starting row of my dataset and give me back that entry from the array I have in column A.
And you could wrap the whole thing in an IFERROR() statement too to not have error values pop up.
One place to find more data about this would be here
Hope that makes sense and does the trick!
This might be useful (dont know exactly this is what u want)
Sub test_index()
Dim ii As Integer, jj As Integer
ii = 23
jj = 24
With ActiveSheet
For ii = 23 To 34
Cells(ii, 12).Formula = "=INDEX(Software!B" & ii & ":Software!B" & ii & _
",MATCH(TRUE,INDEX(Software!A" & ii & ":Software!A" & ii & ",0,0),0))"
Next
End With
End Sub
I am trying to generate a customer number using the first three letters of the customers last name, the first name initial and middle initial, followed by the last four of their phone number. How would I do this? All I need is the formula.
First_Name Middle_Initial Last_Name Street_Address City State Zip Phone
Nathaniel E. Conn 6196 View Ct Lancing TN 37770 567-273-3956
Something like this (assuming a table with [structured-references], fill in the actual cell names if not):
=LEFT([LastName] & "---", 3)
& LEFT([FirstName] & "-", 1)
& LEFT([MiddleInitial] & "-", 1)
& RIGHT([PhoneNumber] & "----", 4)
I have used dashes ("-") to fill in any spaces where the field might be smaller than the number of characters you need from it. You can change them to any fill character that suits you.
Well, it depends on if each piece of data has its own column, looks like it does.
You can use the left/right functions to parse the data out of your columns.
=CONCATENATE(RIGHT(C1,3) & LEFT(A1,1) & LEFT(B3,1) & RIGHT(H1,4))
I would do:
=MID(CELL_LAST_NAME;1;3)&MID(CELL_FIRST_NAME;1;1)&MID(CELL_MIDDLE_NAME;1;1)&MID(CELL_PHONE;LEN(CELL_PHONE)-3;4)