im really hoping someone can help me with this problem.
im looking for a macro i can run that will add the parentID to the end of the cell contents
i have included an exmple sheet and sheet 2 of the work book has an example of what the finished product should look like.
As the woorkbook i am working on has over 6000 rows this is not something i want to go and do manually.
any help would be greatly appreciated.
EDIT: Hey thanks to anyone that looked at this problem but i solved it my self it may not be elegant but it works.
for thos interested in how i did the code is as follws
Public Sub insertParent() Dim rCell As Range Dim cNum As Long Dim cColOffset As Long For Each rCell In Range("C3:F7000") cColOffset = rCell.Column - 1 If Not IsEmpty(rCell) And Not IsNumeric(rCell) Then If IsEmpty(rCell.Offset(-1, 0)) And Not IsEmpty(rCell.Offset(-1, -1)) Then cNum = rCell.Offset(-1, -cColOffset).Value rCell.Value = rCell.Value & ", " & cNum Else rCell.Value = rCell.Value & ", " & cNum End If End If Next rCell End Sub
Last edited by Aussiexile; 11-19-2010 at 12:44 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks