vba data collection based on criteria

Villalobos

New Member
Joined
Sep 5, 2013
Messages
44
Hello, I am trying to create a code which is able to collect the data (from Sheet1) based on criteria and transfer these data (to Sheet2). My target is that to collect those data from Sheet1 which date are lower than today +1 day and sum these quantities on Sheet2. To SUMIFS the data I use this: Application.WorksheetFunction.Sheets("...").Cells(rw, ...).Value = SumIfs(Sheets("...").Range("..."), Sheets("...")Range("..." : "...") and so on, but now I stuck. Could somebody help me how should I do it? Thanks in advance the reply
Data of Sheet2 - Result of macro run
Item
Quantity
AA
200
BB
450
CC
700
DD
400

<tbody>
</tbody>
Data of Sheet1
Item
Quantity
Date
AA
100
30.12.2013
DD
100
01.30.2014
BB
200
28.12.2013
BB
250
29.12.2013
CC
300
29.12.2013
BB
300
11.02.2014
CC
100
30.12.2013
CC
300
30.12.2013
DD
400
01.05.2014
AA
100
31.12.2013

<tbody>
</tbody>




























<tbody>
</tbody>
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,136,353
Messages
5,675,288
Members
419,559
Latest member
BraytonM

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
Top