Based on criteria (date), copy & paste entire row matching criteria as values VBA

rabrol

New Member
Joined
Nov 18, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi. New to VBA. I have looked and as of yet have not found a solution to my query.

I have an excel workbook with 2 sheets:

Date Ref = sheet containing Date reference (today()-1 i.e. yesterday) in cell F8.
Data Sheet
= contains Date in column B and remainder columns containing formulas which will import values from other workbooks.

I would like VBA to:

1) Refresh data F9 (so that formulas in 'Data Sheet' are updated by looking up data in external workbooks. These workbooks would be manually open.
2) Once data refreshed and formulas show a value, VBA to look at 'Date Ref' sheet, cell F8 which contains a Yesterdays date
3) Then go 'Data Sheet', find the Row containing/matches F8 and then past over the same row as values to hardcode the values. E.g. if F8=18/11/2020, then it would copy and paste the entire row A9 as values (pastes over itself in Data Sheet A9).

For some reason MrExcel wont let me attach workbook which contains the information :(

Any assistance would be greatly appreciated.
 

Attachments

  • Data Sheet.JPG
    Data Sheet.JPG
    163.1 KB · Views: 25
  • Date Ref.JPG
    Date Ref.JPG
    27.8 KB · Views: 27

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,224,830
Messages
6,181,225
Members
453,025
Latest member
Hannah_Pham93

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