VBA to copy, format, drag down data from other workbooks

Yna26

New Member
Joined
Jun 13, 2024
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
Hi, I am as new to this forum as I am to VBA. A little background: I have a big excel file with two sheets, it's getting bigger day after day as I'm importing new data on both sheets from other workbooks. I have formulas in sheet1 and certain columns are updated based on data from sheet2 and vice versa with sheet 2, and what I am looking for is a VBA code for sheet1 to get me the new rows in between other rows based on certain conditions and to format them based on the same criteria of the previous included rows and I am completely failing to do that (at the moment I'm manually doing the job by inserting new rows, copy new data, drag down formulas, format painter, text to columns, etc.). The file is too big to be shared and requires lots of explaining of what I'm actually looking for Thank you in advance!
 
Last edited by a moderator:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi All, in my worksheet i have 2 types of shipment numbers tbe-0000 and tbew-0000. These shipments can have from 1 to several products i.e. rows to be copied in my worksheet (Tracking data) from another worksheet (Shipment details) and I am looking for a code to identify the last tbe number in my worksheet which is let's say tbe-6655 and copy the tbe-6656 rows right below it, then tbe-6657 rows and so on, same way to work with tbew. The only way I managed to do it so far was to create new rows at the end of the entire table and copy data which looks too chaotic as I must mention the fact that first part of my table contains tbe numbers, then towards the bottom of the table right after last tbe starts the tbew. I also mention the fact that I don't always receive them in their numerical order i.e. if my last tbe was tbe-6655 and now I received tbe-6657 first, I would like the code to still be able to identify and insert rows from tbe-6657 right below last row of tbe-6655 until I get data on tbe-6656 which would then be copied in between tbe-6655 and tbe-6657. I hope it makes sense and Appreciate any help.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,178
Members
452,615
Latest member
bogeys2birdies

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