VBA: Search column data and, cross check data from other columns in that row and copy that original data to a specific cell.

WhiteRaven76

New Member
Joined
Jun 27, 2022
Messages
10
Office Version
  1. 365
Platform
  1. Windows
This is somewhat beyond me (as the awkward title of the thread shows)

I have a document that I download from a website. I have been able to setup the tile this far to do a bunch of automated tasks for me. What I have left is beyond what I can do however.

I am trying to create a VBA macro that will look at a column and check to see if the date is a Saturday. It will also check a column for specific text. If both match then it will copy the date from the original column to a specific cell. It will then continue checking the column and paste the data in specific cells.Within that same macro (or possibly a separate one), it will look through the same row as above and check for the same criteria (Saturday date and specific text from another cell) and copy the data from a different column to a specific cell.

The macro would copy over the start time, start lunch, ending lunch and end of day for each day of the week, starting with Saturday.

Any help on how to get started with a task like this would be greatly appreciated!

As some insight, I am trying to have the macro check column W and if the date is a Saturday date AND the text from column D is 010 THEN it copies the date from column W to cell A41. It would also take the time from column AB and copy that to cell B41. It would then look for the specific text 012, 013 and 014 and copy the date to cell A42, A43 and A44 (and B42, B43 and B44). If there is no 010, 012, 013 or 014 data for Saturday in column D, then it would skip and move on.

Then it will look for Sunday and that data goes to E41-E44 and F41-F44. Monday is I & J 41-44
Tuesday is A & B 47-50, Wednesday is E & F 47-50, Thursday is I & J 47-50 and Friday is A & B 53-56
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,223,719
Messages
6,174,089
Members
452,542
Latest member
Bricklin

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