Formula or VBA for extraction of cell data within two dates to a different sheet

VonHelson

New Member
Joined
Nov 13, 2018
Messages
15
Hi All,

So I'm working with a data sheet containing lots of data and I'm looking to copy across row data based on a defined date range. The range is today - 5.

The data I'm trying to copy across is in Sheet2 and I want to pull out data from a date range in merged cells with the code =TODAY() and =TODAY()-5 which sits in Sheet4.

I've done some investigations but I keep on getting met with the solution to use Kutools to resolve it which I don't want to do as other people will be using this workbook who wont have access to Kutools. I've also tried -

=IF(ROWS(A$5:A5)>$C$2,"",INDEX(Sheet1!A$2:A$22,SMALL(IF((Sheet1!$A$2:$A$22>=$A$2)*(Sheet1!$A$2:$A$22<=$B$2),ROW(Sheet1!A$2:A$22)-ROW(Sheet1!$A$2)+1),ROWS(A$5:A5))))

I took this from and changed the values and sheets but it didn't work. I can't figure out why. Would it be because the date range in Sheet4 sits in a merged cell?

If you guys could help me with either a VBA script or a calculation to get this done it would help me out a whole lot.

Many Thanks
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Watch MrExcel Video

Forum statistics

Threads
1,123,251
Messages
5,600,540
Members
414,386
Latest member
PARAMATHMA SENTHILNATHAN

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