问题
I am trying to create a spreadsheet that shows if certain shipments of parts have arrived yet, but I am stuck on the IF Statement. Basically, I want it to check if a certain ticket number is present in the column as each ticket has a unique ID.
My current code:
=IF(REGEXMATCH(E2, 'Shipment Inventory Responses'!D:D), "Yes", "No")
I want it do check if the data in 1 cell on the current sheet is present in the D column of another sheet. However, The sheet is empty and it is outputting "Yes". Please help?
回答1:
You can use this formula to achieve what you want to do:
=if(countif('Shipment Inventory Responses'!D:D, E2),"Yes","No")
if you want to use it with an arrayformula for instead of the cell E2
only you could search in the whole column E
, you can have the following formula:
=ArrayFormula(if(len(E2:E),if(countif('Shipment Inventory Responses'!D:D,E2:E),"Yes","No"),))
来源:https://stackoverflow.com/questions/64280980/how-can-i-check-if-a-certain-ticket-is-present-in-a-column