Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dim rng As Range
With Worksheets("Data") Set rng = .Range("a2", .Range("a" & Rows.count).End(xlUp)) End With rng.Select -------------------- With above code I select all data in column A. How can I select all data in row 1. I mean what is the equal code for selecting columns in a row ? Thank you. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
HI
Look at this: Dim Rng2 As Range With Worksheets("Data") Set rng = .Range("a2", .Range("a" & Columns.Count).End(xlToLeft)) End With Regards, Per "darkblue" skrev i meddelelsen ... Dim rng As Range With Worksheets("Data") Set rng = .Range("a2", .Range("a" & Rows.count).End(xlUp)) End With rng.Select -------------------- With above code I select all data in column A. How can I select all data in row 1. I mean what is the equal code for selecting columns in a row ? Thank you. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Feb 6, 4:54*pm, "Per Jessen" wrote:
HI Look at this: Dim Rng2 As Range With Worksheets("Data") * * * *Set rng = .Range("a2", .Range("a" & Columns.Count).End(xlToLeft)) End With Regards, Per "darkblue" skrev i ... Dim rng As Range With Worksheets("Data") * * * Set rng = .Range("a2", .Range("a" & Rows.count).End(xlUp)) End With rng.Select -------------------- With above code I select all data in column A. How can I select all data in row 1. I mean what is the equal code for selecting columns in a row ? Thank you.- Hide quoted text - - Show quoted text - Thank you so much Per. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
One way with the usual caveat that it is very unlikely you need to select the range to do what you want. Dim rng As Range With Worksheets("Sheet1") LastCol = .Cells(1, Columns.Count).End(xlToLeft).Column Set rng = .Range(Cells(1, 1), Cells(1, LastCol)) End With rng.Select -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "darkblue" wrote: Dim rng As Range With Worksheets("Data") Set rng = .Range("a2", .Range("a" & Rows.count).End(xlUp)) End With rng.Select -------------------- With above code I select all data in column A. How can I select all data in row 1. I mean what is the equal code for selecting columns in a row ? Thank you. . |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Feb 6, 5:31*pm, Mike H wrote:
Hi, One way with the usual caveat that it is very unlikely you need to select the range to do what you want. Dim rng As Range With Worksheets("Sheet1") LastCol = .Cells(1, Columns.Count).End(xlToLeft).Column Set rng = .Range(Cells(1, 1), Cells(1, LastCol)) End With rng.Select -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "darkblue" wrote: Dim rng As Range With Worksheets("Data") * * * *Set rng = .Range("a2", .Range("a" & Rows.count).End(xlUp)) End With rng.Select -------------------- With above code I select all data in column A. How can I select all data in row 1. I mean what is the equal code for selecting columns in a row ? Thank you. .- Hide quoted text - - Show quoted text - Thank you very much Mike. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
data selecting | Excel Worksheet Functions | |||
Selecting Data | Excel Discussion (Misc queries) | |||
Selecting most recent data within several lines of data | Excel Discussion (Misc queries) | |||
Pivot charts - data disappear after selecting or data are static | Excel Worksheet Functions | |||
Selecting data | Excel Worksheet Functions |