0
i have a CSV file containing various data that i have set a macro up to run the following formula for in a second sheet
(For reference the CSV file might contain 20 items [aswell as other data i dont need], all of which will have a Name, Serial Number and Location)
=FILTER(Sheet1!$F:$F &"",Sheet1!$C:$C=A1, "")
where A1 would be equal to "Item Name"
i have a piece of text in A1 called "Item Name" - my formula effectively searches column C in sheet one for the word "Item Name" and then filters out all the answers to that question from column F.
this works perfectly for all the questions that are asked every time and lists out the data i require.
The issue i have some questions are only asked on some of the items, and although it picks out the answers, it doesnt put them into the correct rows of items (just lists them from the next row down)
i was wondering if i could combine some statements or nest an xlookup to say, first look for the Item Name, and then return the next answer to this question
EG: look for Item name, and then return the answer to the question in cell D1
i dont mind if its a nested xlookup, or an if and filter combination, or any method as long as it returns it in the correct row
i have tried an if function combined with filter, but this results in a #SPILL! message
=IF(Answer=A2,(FILTER(Answer &"",Question=D1,"")),"Not Found")
ive also tried the opposite way
=FILTER(Answer&"",IF(Question=D1&Answer=A2,"Answer","False"),"Not Found")
ive also tried a nested xlookup
=XLOOKUP(A2, AnswerF:F, XLOOKUP(D2,QuestionC:C,AnswerC:C,"")) where A2 is the item name, and D2 is the new question
im happy to share the file with anyone if this helps and i hope i have explained myself properly.
thanks for any help with what i am doing wrong
i have a CSV file containing various data that i have set a macro up to run the following formula for in a second sheet
(For reference the CSV file might contain 20 items [aswell as other data i dont need], all of which will have a Name, Serial Number and Location)
=FILTER(Sheet1!$F:$F &"",Sheet1!$C:$C=A1, "")
where A1 would be equal to "Item Name"
Item Name | Serial Number | Location | Door Type |
---|---|---|---|
(Filter goes here) | (Filter goes here) | (Filter goes here) | (Filter goes here) |
i have a piece of text in A1 called "Item Name" - my formula effectively searches column C in sheet one for the word "Item Name" and then filters out all the answers to that question from column F.
this works perfectly for all the questions that are asked every time and lists out the data i require.
The issue i have some questions are only asked on some of the items, and although it picks out the answers, it doesnt put them into the correct rows of items (just lists them from the next row down)
i was wondering if i could combine some statements or nest an xlookup to say, first look for the Item Name, and then return the next answer to this question
EG: look for Item name, and then return the answer to the question in cell D1
i dont mind if its a nested xlookup, or an if and filter combination, or any method as long as it returns it in the correct row
i have tried an if function combined with filter, but this results in a #SPILL! message
=IF(Answer=A2,(FILTER(Answer &"",Question=D1,"")),"Not Found")
ive also tried the opposite way
=FILTER(Answer&"",IF(Question=D1&Answer=A2,"Answer","False"),"Not Found")
ive also tried a nested xlookup
=XLOOKUP(A2, AnswerF:F, XLOOKUP(D2,QuestionC:C,AnswerC:C,"")) where A2 is the item name, and D2 is the new question
im happy to share the file with anyone if this helps and i hope i have explained myself properly.
thanks for any help with what i am doing wrong
Column C | Column F |
---|---|
(Question) | (Answer) |
Items 1 | |
Item Name | abcd |
Serial Number | 123456 |
Location | Kitchen |
Items 2 | |
Item Name | abcde |
Serial Number | 1234567 |
Location | Kitchen |
Items 3 | |
Item Name | abcdef |
Serial Number | 12345678 |
Location | Kitchen |
Door Type | Wooden |