zookeepertx
Well-known Member
- Joined
- May 27, 2011
- Messages
- 589
- Office Version
- 365
- Platform
- Windows
I'm trying to help a coworker by creating a macro to format a report for her. This report has the data divided up by vendors, with the sections separated by a cell that has the vendor's information in it. There's no telling from month to month how many vendors will be on the report or how many lines of data will be under each vendor - although it's usually between 1-10 lines under any given vendor. The vendor info is in column C & the data is arranged under that, also starting in column C. The columns C-N contain data. There are also blank lines between the vendor info & the data as well as between that data & the next vendor's info.
The vendor's info looks like this example. "Vendor ID: 1234,Vendor: John Doe". What we need to do is to pull out just the ID - 1234 - and the name - John Doe - and have it look like this "1234-John Doe", and for that to be pasted in column A beside each row of ONLY the data under that vendor. The next vendor, let's say "Vendor ID: 876,Vendor: Old Macdonald's Farm" should be pasted in column A beside ONLY their data, formatted as "876-Old Macdonald's Farm". Each vendor's data is in consecutive rows; no blank rows until that vendor's data is finished.
Currently, this is having to be done by hand & it would speed things up considerably if it could be done in a macro!
I'm not good with technical-speak, so please don't think I'm a blithering idiot, LOL!
The vendor's info looks like this example. "Vendor ID: 1234,Vendor: John Doe". What we need to do is to pull out just the ID - 1234 - and the name - John Doe - and have it look like this "1234-John Doe", and for that to be pasted in column A beside each row of ONLY the data under that vendor. The next vendor, let's say "Vendor ID: 876,Vendor: Old Macdonald's Farm" should be pasted in column A beside ONLY their data, formatted as "876-Old Macdonald's Farm". Each vendor's data is in consecutive rows; no blank rows until that vendor's data is finished.
Currently, this is having to be done by hand & it would speed things up considerably if it could be done in a macro!
I'm not good with technical-speak, so please don't think I'm a blithering idiot, LOL!