Transfer values from column to row using macro!

A

aiyer

Hello all!

Am using this forum fot the first time and am still on the learnin
curve here. But here is what I was trying to do.I was trying to cop
the values from a column to a different area in the same work sheet.

Let'z just say, we have values for node numbers in the first column (
) in the sheet. Somewhere else (some cell) in the same sheet, I woul
like to have the first node number in the column A, its area in th
immediate CELL/row that is below the above one and a certain commen
(text message) about the selected nodes, immediately below that
(likewise, all the nodes, one line below the other..) So we ar
essentially transerring values from columns to rows, with some extr
line of comment for each column number/node.

I used a simple do loop & was able to get the total count of the activ
cells for me to do the looping for this transfer. But am getting stuck
while transferring the values from columns to rows as explaine
above.

I am attaching the macro that I wrote for the same and I woul
appreciate any suggestions.

Thanks guys,

Arun.
Vextec Corp

Attachment filename: trial.macro.txt
Download attachment: http://www.excelforum.com/attachment.php?postid=43951
 
A

acw

H

If I understand things, you want E5 to reference A2, E6 to A3, E7 to A4 then move to F5 which references A5 ....

This assumes that there will be 3 lines of data for each code, so if the code exists, then there will be reference data below

Tony

Sub try(

Range("e5").Selec
rowcnt =
While Not IsEmpty(Cells(rowcnt + 1, 1)

For i = 1 To
ActiveCell.Formula = "=r" & rowcnt + i & "c1
ActiveCell.Offset(1, 0).Selec
Next
rowcnt = rowcnt +
ActiveCell.Offset(-3, 1).Selec
Wen
End Su


----- aiyer > wrote: ----

Hello all

Am using this forum fot the first time and am still on the learnin
curve here. But here is what I was trying to do.I was trying to cop
the values from a column to a different area in the same work sheet

Let'z just say, we have values for node numbers in the first column (
) in the sheet. Somewhere else (some cell) in the same sheet, I woul
like to have the first node number in the column A, its area in th
immediate CELL/row that is below the above one and a certain commen
(text message) about the selected nodes, immediately below that
(likewise, all the nodes, one line below the other..) So we ar
essentially transerring values from columns to rows, with some extr
line of comment for each column number/node

I used a simple do loop & was able to get the total count of the activ
cells for me to do the looping for this transfer. But am getting stuck
while transferring the values from columns to rows as explaine
above

I am attaching the macro that I wrote for the same and I woul
appreciate any suggestions

Thanks guys

Arun
Vextec Corp

Attachment filename: trial.macro.txt
Download attachment: http://www.excelforum.com/attachment.php?postid=43951
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top