Ok after looking at this it is not quite what I need as in your advice F1 and F2 and the same with colum B need to be the same field name for me, in an excel spread sheet it would be the row above minus the row below. I would have to be something like,
Code:
=IIF(row2 (shopordernumber)=row 1 (shopordernumber), row1(WIP)-row2(WIP),0)
So if in my query result the (shopordernumber) from row1 result = the (shopordernumber) from row2 it would take the (WIP) result from row 2 and subtract it from row 1.
results from query
---------shopordernumber --- WIP --- Formula needed
Row 1 -------- 12345 -------- 2000 -------- 0
Row 2 ---------12345 -------- 500 ------- 1500