Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
moving columns to a new sheet
i have the workbook attached, in sheet1 i have a list of hyperlinks in column A, and Names in column B what i want to do is in sheet 2 column A - shows the Column A from sheet 1 without the hyperlink Coulmn B - Shows the Column A Actual hyperlink url Coulmn C - Shows Column B from sheet 1 i know i need a macro to do this but not sure how to do this, i have attached a small example of what i need many thanks Craig +-------------------------------------------------------------------+ |Filename: test.zip | |Download: http://www.excelforum.com/attachment.php?postid=5013 | +-------------------------------------------------------------------+ -- craigmacca ------------------------------------------------------------------------ craigmacca's Profile: http://www.excelforum.com/member.php...o&userid=36259 View this thread: http://www.excelforum.com/showthread...hreadid=560521 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
moving columns to a new sheet
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 Su -- jette ----------------------------------------------------------------------- jetted's Profile: http://www.excelforum.com/member.php...fo&userid=1753 View this thread: http://www.excelforum.com/showthread.php?threadid=56052 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
formula for moving information from one sheet to another sheet | Excel Discussion (Misc queries) | |||
Moving Columns | Excel Discussion (Misc queries) | |||
moving informatiion from one sheet to a total sheet | Excel Discussion (Misc queries) | |||
Moving Columns only | Excel Programming | |||
Moving Columns | Excel Programming |