Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Would a loop work?
I have a list of SSNs (social security numbers) along with various line
of information that looks something like this: 123456789 , 1 , 64A , 114 , 75.11 , 1.7180 _________, 2 , 65A , 207 , 30.34 , 0.6050 Each of the commas represent a different cell. In other words, the SSNs do not extend down for each line, and ther are multiple lines for each SSN. This is quite an extensive list and need the appropriate SSN to extend to each line that is associated wit it so that it would look like this: 123456789 , 1 , 64A , 114 , 75.11 , 1.7180 123456789 , 2 , 65A , 207 , 30.34 , 0.6050 How would I write a macro to do this? I've tried using a loop but it refused to work so I scrapped the entir thing. Any help would be greatly appreciated!! ti -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Would a loop work?
In code my suggestion would be: Sub FillBanks() Dim rng as Range set rng = columns(1).specialCells(xlblanks) rng.Formula = "=" & rng(1).offset(-1,0).address(0,0) set rng = range(cells(1,1),cells(rows.count,1).End(xlup)) rng.Formula = rng.Value End Sub -- Regards, Tom Ogilvy "sixfivebeastman " wrote in message ... I have a list of SSNs (social security numbers) along with various lines of information that looks something like this: 123456789 , 1 , 64A , 114 , 75.11 , 1.7180 _________, 2 , 65A , 207 , 30.34 , 0.6050 Each of the commas represent a different cell. In other words, the SSNs do not extend down for each line, and there are multiple lines for each SSN. This is quite an extensive list and I need the appropriate SSN to extend to each line that is associated with it so that it would look like this: 123456789 , 1 , 64A , 114 , 75.11 , 1.7180 123456789 , 2 , 65A , 207 , 30.34 , 0.6050 How would I write a macro to do this? I've tried using a loop but it refused to work so I scrapped the entire thing. Any help would be greatly appreciated!! tim --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how can i automatically generate work order numbers from work orde | Excel Discussion (Misc queries) | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
Worksheet_Change - loop within a loop | Excel Programming | |||
Why doesn't my loop work? | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |