VBA to populate cells on one worksheet with cells from another worksheet based on date help!!!

Taekwon

New Member
Joined
May 16, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, I am new to the forum and am in need of some assistance!!

I have been asked to create a spreadsheet that fills out certain cells in a worksheet, with data in cells from another worksheet in the same workbook, and print out this sheet!!

I am not new to VBA but am far from being an expert!! Most of the VBA I create are done by the recording method, but this is over my head!

The date will be yesterday's date (Cell AA1 on Sheet2), and when activated the VBA will look at column A on sheet2024, until it finds yesterday's date, it then takes the data from that row and adds it to specific cells on sheet2, Date (Column A) to B4 (Sheet2), Model (Column B) to E4 (Sheet2), Serial number (Column D) to H4 (Sheet2), Dealer (Column E) to K4 (Sheet2), Returns Number (Column F) to N4 (Sheet2), Reason for Return (Column G) to Q4 (sheet2)

the Check in Factory and Check in Service need to be colour coded Green for Factory and Red for Service, this determined by the colour coding on Sheet 2024 in column B!

The VBA needs to then print out the completed card, and clear the data, it then needs to look at the next row with the same date, and do the above again, with the next row of data if there is anymore to do, if there is nothing more to do, then the VBA can just stop or show a text box stating it has completed?

I hope the above makes sense, and hope I've not broken any rules!!

Thanks in advance for any assistance...
 

Attachments

  • Sheet 2024 view.jpg
    Sheet 2024 view.jpg
    229.1 KB · Views: 6
  • Sheet2 View.jpg
    Sheet2 View.jpg
    153.8 KB · Views: 7

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Copy of Returns 2024.xlsx
ABCDEFGHIJKLMNOPQRST
1DATEMODEL CODESERIAL NUMBERDEALERRETURNS NUMBERREASON FOR RETURN
2
3
4
5
6CHECK IN FACTORYCHECK IN SERVICERETURN TO FGDS 0004 NEW STOCKRETURN TO SALE SHOP SOILEDSCRAP REFER TO PRODUCTION CONTROL
7
8
9
10
11CHECK COMPLETEDATE CHECKEDPRINT NAMESIGNED
12
13
14
Sheet2


Sheet2 Xl2BB above.
 
Upvote 0
Copy of Returns 2024.xlsx
ABCDEFG
1DateModelDescriptionSerial noDealerReturns NoReason for return
229.04.2024CODE555AHawk 43 SP323000366 or 370Fosseway830007618Freight damage
307.05.2024CODE373AHarrier 41 push 60V412322664Websales830007855Freight damage
407.05.2024CODE576BHarrier 56 E/S410104291Chester Small PlantN/A (replacement was FOC)Starting issues
509.05.202422590Dingo Bucket GrappleGarden Machines Northampton830007877Ordered in error
610.05.2024CODE120A60V BATTERY CHARGER 2 AMP322193601WebsalesN/A (replacement was FOC)Sent back with faulty machine - no issues
710.05.202481850BATTERY-LI-ION, 60V 4.0AH324010312WebsalesN/A (replacement was FOC)Sent back with faulty machine - no issues
814.05.2024CODE377AHarrier 41 Cordless Variable Speed Mower 60V407663659Websales-Dealer delivery61609250
914.05.2024CODE555AHAWK 43CM ROLLER 60V SP322001269Websales61609250Autrodrive issues
1014.05.2024CODE120A60V BATTERY CHARGER 2 AMP CE HAYTER322157007Websales61609250Sent back with faulty machine - no issues
1114.05.202481850BATTERY-LI-ION, 60V 4.0AH, CE[RETAIL]324010406Websales61609258Sent back with faulty machine - no issues
1215.05.2024CODE555AHAWK 43CM ROLLER 60V SP322001269Websales61609250Autrodrive issues
1315.05.2024CODE120A60V BATTERY CHARGER 2 AMP CE HAYTER322157007Websales61609250Sent back with faulty machine - no issues
1415.05.202481850BATTERY-LI-ION, 60V 4.0AH, CE[RETAIL]324010406Websales61609258Sent back with faulty machine - no issues
15
2024


Sheet 2024 Xl2BB code above.
 
Upvote 0

Forum statistics

Threads
1,223,854
Messages
6,175,018
Members
452,602
Latest member
Luka Vladimir

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