Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
How do I select the bottom half of a column's cells in a macro?
|
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
with/without blanks and why
-- Don Guillett SalesAid Software "Rokuro kubi" wrote in message ups.com... How do I select the bottom half of a column's cells in a macro? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
Sub Untested()
Rw = Range("A65536").End(xlUp).Row 'change "A" to the column you're interested in Rw = Rw \ 2 Range(Range("A1").Offset(Rw), Range("A65536").End(xlUp)).Select End Sub "Rokuro kubi" wrote in message ups.com... How do I select the bottom half of a column's cells in a macro? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
Hello,
For example: Dim i As Long, j As Long i = Range("A1").Column j = Cells(65536, i).End(xlUp).Row Range(Cells(j / 2 + 1, i), Cells(j, i)).Select HTH, Bernd |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
Sub selecthalfcolumn()'ignores blanks
lr = Cells(Rows.Count, "a").End(xlUp).Row / 2 Range(Cells(1, 1), Cells(lr, 1)).Select End Sub -- Don Guillett SalesAid Software "Rokuro kubi" wrote in message ups.com... How do I select the bottom half of a column's cells in a macro? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
Because a column always contains 65536 cells, the bottom half is 32769 thru
65536. For example: Sub gsnu() Range("A32769:A65536").Select End Sub -- Gary's Student "Rokuro kubi" wrote: How do I select the bottom half of a column's cells in a macro? |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
Don Guillett wrote: with/without blanks and why -- Don Guillett SalesAid Software "Rokuro kubi" wrote in message ups.com... How do I select the bottom half of a column's cells in a macro? Hi Don, The sheet is fairly uniform - there will be data in every cell in that column until the last usedrow of the sheet. Exactly half of the figures in column F will be duplicates and column E will be always be one of two values. I need to lose the data directly adjacent to all cells showing Value 2. |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
Don Guillett wrote: Sub selecthalfcolumn()'ignores blanks lr = Cells(Rows.Count, "a").End(xlUp).Row / 2 Range(Cells(1, 1), Cells(lr, 1)).Select End Sub -- Don Guillett SalesAid Software "Rokuro kubi" wrote in message ups.com... How do I select the bottom half of a column's cells in a macro? That's great Don, cheers |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Halfway to End
65536 wont be true with next xl version
column's cells -- Don Guillett SalesAid Software "Gary''s Student" wrote in message ... Because a column always contains 65536 cells, the bottom half is 32769 thru 65536. For example: Sub gsnu() Range("A32769:A65536").Select End Sub -- Gary's Student "Rokuro kubi" wrote: How do I select the bottom half of a column's cells in a macro? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
if month is less than halfway over subtract 1 | Excel Worksheet Functions |