LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default making labels

I found this code snippet in Google groups and it works to do what I
need done - move contents of A2 to B1, contents of A3 to C1.
But I need it to do it for some 500 or so records, and it won't go
past the first one.

I tried a Do While...Next loop where it should continue while r0 but
that first put the data into b and c and on the next loop it took it
back out!! I haven't a clue why that is happening.

I then thouhgt if I deleted the now empty rows, the next addr would
then be in A1, but of course, that deleted the successful move from
the first round of the code.

I'm at a loss how to access the rest of the addresses to get them into
the new format.
Could someone please help me with this - or perhaps I should use a
different approach. I was thinking if I move the info into A1, B1 and
C1 of a second sheet, then deleted all the empty rows so that the next
addr is now at A1, I could do it that way and then just dump the empty
sheet.
As you can see, I am fumbling in the dark. Please help

Public Sub RowsToCols()
Dim r
Dim I
r = Range("A1").CurrentRegion.Rows.Count

For I = 1 To r Step 3
Range("A1").Offset(I - 1, 1).Value = Range("A1").Offset(I,
0).Value
Range("A1").Offset(I - 1, 2).Value = Range("A1").Offset(I + 1,
0).Value
Range("A1").Offset(I, 0).Value = ""
Range("A1").Offset(I + 1, 0).Value = ""

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Data and Axis Labels Different Risky Dave Charts and Charting in Excel 2 February 23rd 10 07:29 PM
Making Box Labels on UPS Thermal Using Excel. Helterran Excel Discussion (Misc queries) 1 March 20th 09 11:23 PM
making labels 'Easy to detect' tmoyer Excel Discussion (Misc queries) 0 May 15th 07 05:58 PM
Data labels: Making the value currency & use % in a chart? AKO Charts and Charting in Excel 1 August 2nd 05 09:47 PM
Making Mailing Labels Jerry Links and Linking in Excel 4 January 7th 05 05:09 PM


All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"