Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want a Macro that will select the A and the D columns (this column has
blank cells) of a database(database records is variable) and only copy these two columns to a new sheet |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub aa()
Dim rng As Range Set rng = Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp)) Set rng = Union(rng, rng.Offset(0, 3)) Worksheets.Add Range("A1").Select rng.Copy ActiveSheet.Paste End Sub or if you want them in columns A and D on the new sheet Dim rng as Range set rng = Range(cells(1,2),cells(rows.count,1).End(xlup)) Worksheets.Add rng.copy Destination:=Range("A1") rng.offset(0,3).Copy Destination:=Range("D1") -- Regards, Tom Ogilvy "Oldjay" wrote in message ... I want a Macro that will select the A and the D columns (this column has blank cells) of a database(database records is variable) and only copy these two columns to a new sheet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
filters for selective columns? | Excel Discussion (Misc queries) | |||
Copying Selective Data Between Worksheets | New Users to Excel | |||
Copying selective data | Excel Discussion (Misc queries) | |||
Selective stacking of columns in a chart | Excel Discussion (Misc queries) | |||
programming - copying and arranging selective data ...pls help....i know u can... | Excel Programming |