using a header as an identifier for an input range

drop05

Board Regular
Joined
Mar 23, 2021
Messages
113
Office Version
  1. 365
Platform
  1. Windows
Hello using VBA, i am wondering if this is possible. I have a cell that is a header, to be an identifier i guess you could say. So i have batches and inside i want entries starting at cell A51 that contains the words "Schedule A" and I have data points that I want to copy from that section of the header that are located starting in column G row 52 which is a name value, so about 6 columns to the right and one row down. and an address which is G53. There can also be more than one name and address and the second input of those are on row G57 (name) and G58 (address), so skipping 5 rows for either name or address, so if there was a third name/address then down 5 rows, G62 and G63, a fourth so another 5 rows G67/68 and so on, it can grow depending on if the user wants to add more details
There is another entry of "Schedule A" down on row A402, but that could change if the user adds details to the the first entry. But the logic is the same of wanting to copy from one row down and 6 columns over.
then another schedule A below and multiples under, would want to copy until the last data point so say there is a template of 20 schedule A's and on 3 are put with data from the first batch in G. It copies the data inputted into those name name and address cells until there is no data points for those in that row of G.
Once there is no more then move to column H and do the same thing, but now instead of the cells where name and address goes being 6 columns over it is 7 columns, would be the difference, and same thing goes until the last data point for name/address, then move to column I and J and so on

Is this possible to do in vba?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Zot

Well-known Member
Joined
Nov 26, 2020
Messages
1,995
Office Version
  1. 2016
Platform
  1. Windows
I believe it is is possible but a sample data would be more helpful to visualize what you were trying to explain. I think it is easier to understand that way and many helpers would come for help ;)

You can use xl2bb (icon there to install Add-In to capture parts of worksheet
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,609
Messages
5,765,408
Members
425,284
Latest member
fishymuffin

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
Top