Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code gets the last data cell in column B:
Range("b20000").End(xlUp).Select I would now like to select the Range("Activecell:B2"). How do I do that? Thank you for your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try range(cells(2,2),cells(ActiveSheet.Cells(Rows.Coun t, "B").End(xlUp).row,2)).select though in most cases it is not required to select cells within in macro -- Regards Frank Kabel Frankfurt, Germany Rex Dunlap wrote: The following code gets the last data cell in column B: Range("b20000").End(xlUp).Select I would now like to select the Range("Activecell:B2"). How do I do that? Thank you for your help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Frank, just so I learn this correctly, you say that I
don't need to select cells to do something with a macro. What I wanted to was select all the blank cells in B and put the word "NO" in them. With your help this is what I have: Range("b20000").End(xlUp).Select Range(Cells(5, 2), Cells(ActiveSheet.Cells (Rows.Count, "B").End(xlUp).Row, 2)).Select Selection.SpecialCells(xlCellTypeBlanks).Select Selection.Value = "NO" Range("A4").Select Would you do it differently? Thanks for your help in at least getting me this far and saving me so much time! Kind regards, Rex -----Original Message----- Hi try range(cells(2,2),cells(ActiveSheet.Cells(Rows.Cou nt, "B").End(xlUp).row,2)).select though in most cases it is not required to select cells within in macro -- Regards Frank Kabel Frankfurt, Germany Rex Dunlap wrote: The following code gets the last data cell in column B: Range("b20000").End(xlUp).Select I would now like to select the Range("Activecell:B2"). How do I do that? Thank you for your help. . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This
Range(Cells(5, 2), Cells(ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row, 2)).Select Selection.SpecialCells(xlCellTypeBlanks).Select Selection.Value = "NO" Range("A4").Select can be written as Range("B5:B" & Range("B" & Rows.Count).End(xlUp).Row).SpecialCells(xlCellType Blanks).Value = "NO" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rex" wrote in message ... Frank, just so I learn this correctly, you say that I don't need to select cells to do something with a macro. What I wanted to was select all the blank cells in B and put the word "NO" in them. With your help this is what I have: Range("b20000").End(xlUp).Select Range(Cells(5, 2), Cells(ActiveSheet.Cells (Rows.Count, "B").End(xlUp).Row, 2)).Select Selection.SpecialCells(xlCellTypeBlanks).Select Selection.Value = "NO" Range("A4").Select Would you do it differently? Thanks for your help in at least getting me this far and saving me so much time! Kind regards, Rex -----Original Message----- Hi try range(cells(2,2),cells(ActiveSheet.Cells(Rows.Cou nt, "B").End(xlUp).row,2)).select though in most cases it is not required to select cells within in macro -- Regards Frank Kabel Frankfurt, Germany Rex Dunlap wrote: The following code gets the last data cell in column B: Range("b20000").End(xlUp).Select I would now like to select the Range("Activecell:B2"). How do I do that? Thank you for your help. . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you very much, Bob.
-----Original Message----- This Range(Cells(5, 2), Cells(ActiveSheet.Cells (Rows.Count, "B").End(xlUp).Row, 2)).Select Selection.SpecialCells(xlCellTypeBlanks).Select Selection.Value = "NO" Range("A4").Select can be written as Range("B5:B" & Range("B" & Rows.Count).End(xlUp).Row).SpecialCells (xlCellTypeBlanks).Value = "NO" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rex" wrote in message ... Frank, just so I learn this correctly, you say that I don't need to select cells to do something with a macro. What I wanted to was select all the blank cells in B and put the word "NO" in them. With your help this is what I have: Range("b20000").End(xlUp).Select Range(Cells(5, 2), Cells(ActiveSheet.Cells (Rows.Count, "B").End(xlUp).Row, 2)).Select Selection.SpecialCells(xlCellTypeBlanks).Select Selection.Value = "NO" Range("A4").Select Would you do it differently? Thanks for your help in at least getting me this far and saving me so much time! Kind regards, Rex -----Original Message----- Hi try range(cells(2,2),cells(ActiveSheet.Cells(Rows.Cou nt, "B").End(xlUp).row,2)).select though in most cases it is not required to select cells within in macro -- Regards Frank Kabel Frankfurt, Germany Rex Dunlap wrote: The following code gets the last data cell in column B: Range("b20000").End(xlUp).Select I would now like to select the Range ("Activecell:B2"). How do I do that? Thank you for your help. . . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rex,
Try Range("B2:B" & RANGE("B20000").End(xlUp).Row).Select -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rex Dunlap" wrote in message ... The following code gets the last data cell in column B: Range("b20000").End(xlUp).Select I would now like to select the Range("Activecell:B2"). How do I do that? Thank you for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
selecting every other data point in a column | Excel Worksheet Functions | |||
Selecting data from a specific column | Excel Discussion (Misc queries) | |||
selecting the penultimate cell from a column of data | Excel Worksheet Functions | |||
Selecting data that matches certain criteria in one column | Excel Discussion (Misc queries) | |||
Selecting data from a column | Excel Worksheet Functions |