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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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