Hi I am an excel novice and I am trying to search a table of postcodes matched to a cell with postcodes, to return a political Ward i.e. Pcode: W14 0HY- Ward:Addison. This works using the following formula:
=INDEX(WARDTABLE[[#Headers],[Addison]:[Fulham Broadway]],,SUMPRODUCT(('WARDS Table'!$A$2:$P$1147=[#Postcode])*COLUMN(WARDTABLE[[#All],[Addison]:[Fulham Broadway]])))
I also need two possible other outcomes, where the postcode field is blank, to return Not Stated this works using:
=IF(CS_DATA_18_21[#Postcode]="","Not Stated" )
and if a postcode contain a pcode that is out of borough and doesn't match the postcodes in the WARDTABLE to return "Out of Borough", this works using:
=IF(COUNTIF(WARDTABLE[#All],T2),,"OUT OF BOROUGH")
My problem is I cannot get all three to work together, I keep getting too many arguments error message, the problem is in trying to combine the Index and two IFs formulas.
I hope this makes sense, any advice would be greatly appreciated,
Many thanks
=IFS(CS_DATA_18_21[#Postcode]="","Not Stated",COUNTIF(WARDTABLE[#All],T2)=0,"OUT OF BOROUGH", 1=1, INDEX(WARDTABLE[[#Headers],[Addison]:[Fulham Broadway]],,SUMPRODUCT(('WARDS Table'!$A$2:$P$1147=[#Postcode])*COLUMN(WARDTABLE[[#All],[Addison]:[Fulham Broadway]]))))
Related
I am getting n N/A error when I am searching for a specific day in the header row. If you look to the right you can see the formula where I have searched for the position of 5 using MATCH and it works.
I have tried the following variations as well
MATCH(F7,Table2[[#Headers],[1]:[60]],-1)
MATCH(F7,Table2[[#Headers],[1]:[60]],1)
But these do not work.
On the right you can see that I have created a simple range of numbers from 1 to 9 and I have searched for the number 5 in it, it is working.
PS: I know I can just use the number "23" without using MATCH. But that is not the point, the column orders may be jumbled in some cases (product ID for example). The MATCH function shouldn't fail there.
Being used as table-headers the days are not treated as numbers. Thus, you need to convert the expression you would like to match into text using TEXT() like this
=MATCH(TEXT(F7;"0"); Table2[#Headers]; 0)
Hope this helps.
I would try =index(area or table, 1 this is the row, match( field to match, area to search, 0 = exact match))
Example source here https://exceljet.net/lessons/how-to-use-index-and-match-with-a-table
Hope this helps.
Good afternoon, I'm stuck with a small problem of formulas in excel:
I have a table in another sheet and I have to perform the following operations:
1. number of units sold in Bogota.
2. number of units sold in different cities to Bogota.
I'm trying to use the formula:
=SUMIF(DATOS!$G$4:$G$146;"BOGOTA";DATOS!$H$4:$H$146)
For the first requirement works, but at the moment of using it to know which city is different from Bogota, I do not know how to do it; try to use the <> operator but I get an error and placing the formula as follows:
=SUMIF(DATOS!$G$4:$G$146;NOT("BOGOTA");DATOS!$H$4:$H$146)
do not add the data (Summation gives 0). Someone has an idea of the problem.
I believe you have to put quotes "like this" around the entire logical statement ""<>BOGOTA"
It can be used like this:
=SUMIF(DATOS!$G$4:$G$146;"<>BOGOTA")
Hope this helps
I need to count the amount of times a value shows up in the B column and display it in 3 seperate fields. What I came up with was this piece of code:
=COUNTIF(B2:B6716,"0")
=COUNTIF(B2:B6716,"1")
=COUNTIF(B2:B6716,"2")
But no matter how I enter this It keeps telling me the formula is incorrect. I tried removing the " around the three numbers aswell btw and even in order to test it I even used some words but it just won't work. Any idea how I can get this to work?
The error:
Try something like:
=COUNTIF(B1:B416; "=0")
As a criteria, you should rather put some string that appended to tested value forms a condition, not a particular number. This way, you can formulate more fancy criteria, like:
=COUNTIF(B1:B416; ">100")
I am new to using index/match, and I'm facing some trouble. I have two worksheets, one with table act and the other with table wa. act contains 7,199 rows; wa has 25,099 rows.
I am trying to match order number and date in order to pull a document number from wa onto act. The order numbers will be an exact match, but the date on act is slightly less than the date on wa.
My formula is:
=INDEX(WA[BillingDocumentNumber],(MATCH([#[Customer PO Number]],WA[PO],0)+MATCH([#[GL Posting Date]],WA[CostPostedOn],-1)))
Depending on how I sort the wa data, I have gotten the following results:
494 document numbers returned (sometimes correct; sometimes pulling from the cell in wa directly beneath the cell that should be returned) with the rest #N/A;
approximately 1400 document numbers (all incorrect, I think) with the remaining being either #N/A or #REF
Can anyone help me? I have no practical knowledge of VBA, but I am the resident Excel "expert" (seems funny to me) in my company, so I am the person who is faced with the task of solving this problem... I have combed the existing forums, but I haven't found any that seem to provide a (non-VBA) solution for my problem. Any ideas would be greatly appreciated!
Thank you for your time.
Here is my untested proposed solution:
{=CONCATENATE(IFERROR(IF(AND(WA[PO]=#[Customer PO Number],WA[CostPostedOn]>#[GL Posting Date]),WA[BillingDocumentNumber],""),""))}
Entered as an Array Formula using CTRL + SHIFT + ENTER.
This will return in one text string all results that match the PO number and in which the act date is older than the wa date. You can modify your second and add a third conditional in the AND to create date ranges (ie WA[CostPostedOn]>=#[GL Posting Date]+7 or WA[CostPostedOn]<=#[GL Posting Date]-7).
As you are using arrays though there might be some performance issues when you scale this to 7,000+ formulas. Sadly you can't do a VLOOKUP with 2 conditionals.
Hope this helps. Cheers,
I'm using MCONCAT (part of the morefunc Excel add-in package) to pull extract unique matches from a list of data, my code is as follows:
=MCONCAT(UNIQUEVALUES(OFFSET(B$1,MATCH(D2,A$2:A$68761,0),,COUNTIF(A$2:A$68761,D2))),", ")
This all works OK providing that there is more than one result, otherwise it doesn't seem to work. It DOES work without using UNIQUEVALUES but that returns an enormous amount of results for some lines.
=MCONCAT(OFFSET(B$1,MATCH(D8,A$2:A$68761,0),,COUNTIF(A$2:A$68761,D8)),", ")
Does anyone know how to make my first query work for rows with only a single match?
Many Thanks,
Joe
What's happening here is that UNIQUEVALUES function needs to be passed an "array" and in most cases OFFSET does that.....except when the COUNTIF = 1 and the OFFSET is then just a single value (not an array containing one value) and UNIQUEVALUES doesn't like that so returns an error. I don't know a particularly elegant way round that, perhaps just build a VLOOKUP into the formula when there's an error, i.e.
=IFERROR(MCONCAT(UNIQUEVALUES(OFFSET(B$1,MATCH(D2,A$2:A$68761,0),,COUNTIF(A$2:A$68761,D2))),", "),VLOOKUP(D2,A$2:B$68761,2,0))