PDA

View Full Version : Solved: How to populate a column up until the next column is populated



gp_kelly
06-16-2011, 11:18 AM
I used a very useful macro on this wesbite called "Combine All Data From All Worksheets in All Workbooks in a Specified Directory"


I have added to the macro code so that a new column is populated with a specific value called "Text". However I don't want the entire column to be populate. Only populated as far as the next column is populated.

Here is the extra code I added

Selection.Insert Shift:=xlToLeft
Columns("A:A").Value = "Text"

Kenneth Hobs
06-16-2011, 01:04 PM
Range("A1:A" & Range("B" & Rows.Count).End(xlUp).Row).Value = "Text"

gp_kelly
06-16-2011, 01:16 PM
Hey thanks a million, that works perfectly!