Re: moving columns to a new sheet
- From: jetted <jetted.2au823_1152716411.4899@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 12 Jul 2006 10:57:04 -0400
Hi
You may want to try this
Sub copy_sheet1_sheet2()
Sheets("Sheet1").Select
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To rowcount
Sheets("Sheet1").Select
Range("a" & i).Select
val_a = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
val_c = ActiveCell.Value
ActiveCell.Offset(0, -1).Select
val_b = ActiveCell.Hyperlinks(1).Address
Sheets("Sheet2").Select
Range("A" & i).Select
ActiveCell.Value = val_a
Range("b" & i).Select
ActiveCell = val_b
Range("c" & i).Select
ActiveCell = val_c
Next
Call make_hyperlink
End Sub
Sub make_hyperlink()
Sheets("Sheet2").Select
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To rowcount
Range("b" & i).Select
adr = ActiveCell.Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=adr, _
TextToDisplay:=adr
Next
End Sub
--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=17532
View this thread: http://www.excelforum.com/showthread.php?threadid=560521
.
- References:
- moving columns to a new sheet
- From: craigmacca
- moving columns to a new sheet
- Prev by Date: Re: Concatenate
- Next by Date: Re: button to expand window over two monitors
- Previous by thread: moving columns to a new sheet
- Next by thread: Macro to copy formula to all rows that contain data in columns A:C
- Index(es):
Relevant Pages
|