Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Looping until empty column
Here is my dilemma. I can do VBA in Access, but for some reason I just don't get it in excel. What I want to do is go down a column and store that info in a variable. I want this to happen untill there is no more data. Once I have that data I want to go to another page and store the data in an empty column. I want the program to auto. find the empty column. Thank You in advance. theguz -- theguz ------------------------------------------------------------------------ theguz's Profile: http://www.excelforum.com/member.php...o&userid=24918 View this thread: http://www.excelforum.com/showthread...hreadid=392977 |
#2
|
|||
|
|||
Are you going to copy EVERYTHING in the column, i.e., are you starting with
row 1 and moving down until you find nothing else? If so, just copy the column Now, what's the criteria for finding an empty column? Is it the first column you come to, moving left to right, that has nothing in it? I'll assume that's so. This code copies column A on sheet1 to the first unused column on sheet2 Dim src As Range Dim tgt As Range Set src = Worksheets("sheet1").Range("A:A") With Worksheets("sheet2") Set tgt = .UsedRange.Offset(0, .UsedRange.Columns.Count). _ Resize(1, 1).EntireColumn End With src.Copy tgt "theguz" wrote: Here is my dilemma. I can do VBA in Access, but for some reason I just don't get it in excel. What I want to do is go down a column and store that info in a variable. I want this to happen untill there is no more data. Once I have that data I want to go to another page and store the data in an empty column. I want the program to auto. find the empty column. Thank You in advance. theguz -- theguz ------------------------------------------------------------------------ theguz's Profile: http://www.excelforum.com/member.php...o&userid=24918 View this thread: http://www.excelforum.com/showthread...hreadid=392977 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lookup Table Dilemma | Excel Worksheet Functions | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Return Count for LAST NonBlank Cell in each Row | Excel Worksheet Functions | |||
In Bar Chart, can we display both figures and their respective %a. | Excel Discussion (Misc queries) | |||
Auto Skipping and protected cells | Excel Discussion (Misc queries) |