Writing Macro to Pick Rows from Updating Spreadsheet

TheJackal26

New Member
Joined
Jun 15, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hey all, I've been struggling with this one for the past few days. I wrote a userform that people can use to input data in real time to a spreadsheet. However, I am trying to write a macro (or if there's an elegant function even better) that would allow me to extract all the entries from today's date in real time to a different sheet. I tried the query and filter function but couldn't seem to figure them out.

Does anyone have any suggestions or done anything similar that would jog the imagination? Thanks!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi and welcome to MrExcel

Assuming the following, the data starts in cell A1, the dates are in column 1, the sheet with data is sheet1 and the target sheet is sheet2, then:

VBA Code:
Sub CopyToday()
  With Sheets("Sheet1")
    .Range("A1").AutoFilter 1, xlFilterToday, xlFilterDynamic
    .AutoFilter.Range.EntireRow.Copy Sheets("Sheet2").Range("A1")
    .ShowAllData
  End With
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,214,971
Messages
6,122,525
Members
449,088
Latest member
RandomExceller01

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