I have 2 separate tables ( FullOrders
, ShortedOrders
), each with an [Order Number]
column. FullOrders
shows every order we've fulfilled and ShortedOrders
show only orders that were not sent with all the product.
I've created a column in FullOrders
called [Short?]
and would like it to show a value of 1 if any ShortedOrders[Order Number]
matches the FullOrders[Order Number]
that sits on the same row as FullOrders[Short?]
. Otherwise FullOrders[Short?]
will show 0.
I've tried a few formulas and haven't found the right solution.
Formulas I've tried:
=IF(ShortedOrders[[#Data],[Order Number]]=FullOrder[[#Data],[Order Number]], 1, 0)
=IF(ShortedOrders[[#Headers],[Order Number]]=FullOrder[[#Headers],[Order Number]], 1, 0)
=IF(ShortedOrders[[#Data],[Order Number]]=FullOrder[[#Headers],[Order Number]], 1, 0)
=IF(ShortedOrders[[#Headers],[Order Number]]=FullOrder[[#Data],[Order Number]], 1, 0)
=IF(E2 = ShortedOrders[Order Number], 1, 0)
=IF([Order Number] = ShortedOrders[Order Number], 1, 0)
=IF(E2 = ShortedOrders[[#Data], [Order Number]], 1, 0)
=IF([Order Number] = ShortedOrders[[#Data], [Order Number]], 1, 0)
The results are a 0 for a while, and then #VALUE
after it hits the last record in ShortedOrders
.
An IF
statement may not even be the answer.
I found the answer to this after further research. I needed to nest a COUNTIF
for the comparison of the column to the cell.
=IF(COUNTIF(ShortedOrders[[#Data], [Order Number]],[Order Number])>0, 1, 0)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.