help matching date and using column related to date with copying row data to new new sheet

dlmoore99

Board Regular
Joined
May 20, 2011
Messages
91
Office Version
  1. 2019
Platform
  1. MacOS
Hello smart ones,

I've been trying to get this to work for a while now. I have two sheets: sheet one contains inventory, sheet two will contain a new inventory list based off the the items removed from the inventory on sheet one based of the date the items were removed.

I can make it work when matching one date D1, but as soon as I change the date in I1 to match the other date in E1, I will get #N/A.

so basically I'm trying to move the row data when the quantity of items on specific date are moved from the inventory to create a new list of the items moved for the specific date.

the two (2) helper columns/cells are to help move Row data

If there is a simpler formula to do this, that would be awesome. I'm trying to stay away from VBA and arrays {ctl+shift+enter}

Thank you in advance.


MF Business Report.xlsx
ABCDEFGHIJ
1ItemDescriptionOn Hand3/10/253/25/25Helper 13/25/25
2Item 1Description Item 11 
3Item 2Description Item 21 
4Item 3Description Item 31361
5Item 4Description Item 4553 
6Item 5Description Item 51 
7Item 6Description Item 6552
8Item 7Description Item 7184 
9Item 8Description Item 8633
10Item 9Description Item 9174 
11Item 10Description Item 101 
12Item 11Description Item 113 
13Item 12Description Item 1242 
14Item 13Description Item 13114
15Item 14Description Item 14115
16Item 15Description Item 1530 
17Item 16Description Item 16336
18Item 17Description Item 172 
19Item 18Description Item 18417
20Item 19Description Item 1911 
21Item 20Description Item 2013 
22
23
24
25SHEET 2
26ABCDE
27ItemDescription ItemQTYHelper 2
28Item 3Description Item 3#N/A7
29Item 6Description Item 6#N/A
30Item 8Description Item 8#N/A
31Item 13Description Item 13#N/A
32Item 14Description Item 14#N/A
33Item 16Description Item 16#N/A
34Item 18Description Item 18#N/A
35   
36   
37   
38  
39  
Sheet2
Cell Formulas
RangeFormula
G2:G21G2=IFERROR(IF(MATCH($I$1,$D$1,0),IF(D2<>"",COUNT($G$1:$G1)+1,"")),IF(MATCH($I$1,$E$1,0),IF(E2<>"",COUNT($G$1:$G1)+1,""),""))
A28:A37A28=IF(ROWS($2:2)>$G$28,"",INDEX($A$2:$A$21,MATCH(ROWS('Auction Items'!$179:179),$G$2:$G$21)))
B28:B37B28=IF(ROWS($2:2)>$G$28,"",INDEX($B$2:$B$21,MATCH(ROWS('Auction Items'!$179:179),$G$2:$G$21)))
C28:C37C28=IF(A28="","",IF(MATCH($I$1,$D$1,0),INDEX($D$2:$D$21,MATCH(ROWS($2:2),$G$2:$G$21)),IF(MATCH($I$1,$E$1,0),INDEX($E$2:$E$21,MATCH(ROWS($2:2),$G$2:$G$21)),"")))
G28G28=IF($I$1=$D$1,MAX($G$2:$G$21),IF($I$1=$E$1,MAX($G$2:$G$21),""))
A38:A39A38=IF(ROWS($2:17)>$G$28,"",INDEX($A$2:$A$21,MATCH(ROWS('Auction Items'!$179:194),$G$2:$G$21)))
B38:B39B38=IF(ROWS($2:17)>$G$28,"",INDEX($B$2:$B$21,MATCH(ROWS('Auction Items'!$179:194),$G$2:$G$21)))
 
Please try this,
Excel Formula:
=IF(A28="","",IF($I$1=$D$1,INDEX($D$2:$D$21,MATCH(ROWS($2:2),$G$2:$G$21,0)),IF($I$1=$E$1,INDEX($E$2:$E$21,MATCH(ROWS($2:2),$G$2:$G$21,0)),"")))
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top