LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Selecting Data in Column

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.

.



.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
selecting every other data point in a column Joe Troutman Excel Worksheet Functions 4 May 7th 23 07:43 PM
Selecting data from a specific column Charp Excel Discussion (Misc queries) 1 December 8th 09 05:29 PM
selecting the penultimate cell from a column of data jfp Excel Worksheet Functions 3 July 17th 09 02:37 PM
Selecting data that matches certain criteria in one column Anthony Excel Discussion (Misc queries) 7 May 17th 07 12:48 PM
Selecting data from a column RON Excel Worksheet Functions 3 March 7th 07 02:05 AM


All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"