Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP: Row Selection and VBA guides


Hi all,

just two quick questions, requiring two quick and simple answers.

I have searched the help file and tips and cannot get the answers I
need:

1) what code will allow me to select the row within which the active
cell is.

Eg. I have created a loop to find a certain text within a spreadsheet
and once I have found that text then the cell that the text is in
becomes the active cell. What code will select the row that the text
is in?

2) What are the best text books available for VBA programming. I am
just getting into it and would like a thorough and clear manual.

Please let me know if more infor on problem 1 is needed.

Many thanks,

Pedros.


--
Pedros
------------------------------------------------------------------------
Pedros's Profile: http://www.excelforum.com/member.php...o&userid=28202
View this thread: http://www.excelforum.com/showthread...hreadid=564567

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP: Row Selection and VBA guides


1: Rows(ActiveCell.Row).select
2: Excel 2003 Power Programming with VB

--
Kaa
-----------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...nfo&userid=751
View this thread: http://www.excelforum.com/showthread.php?threadid=56456

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP: Row Selection and VBA guides


Thanks Kaak

Perfect.


--
Pedros
------------------------------------------------------------------------
Pedros's Profile: http://www.excelforum.com/member.php...o&userid=28202
View this thread: http://www.excelforum.com/showthread...hreadid=564567

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP: Row Selection and VBA guides


Kaak, or anyone else that may be able to help......

further to my question above, is there a way to select the row
containing the active cell and all rows below that until there is a
value in the same column as the active cell?

for example, the code below colours all cells below the active cell
yellow until the next cell in the column contains a value. I want a
similar action but with row select.

Do While ActiveCell = ""
Selection.Interior.ColorIndex = 6
ActiveCell.Offset(1, 0).Activate
Loop

Note the active cell is in column B.


--
Pedros
------------------------------------------------------------------------
Pedros's Profile: http://www.excelforum.com/member.php...o&userid=28202
View this thread: http://www.excelforum.com/showthread...hreadid=564567

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP: Row Selection and VBA guides


FirstRow = ActiveCell.Row
Do While ActiveCell = ""
Selection.Interior.ColorIndex = 6
ActiveCell.Offset(1, 0).Activate
Loop
LastRow = ActiveCell.Row
Rows(FirstRow & ":" & LastRow).select


--
Kaak
------------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=564567



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP: Row Selection and VBA guides


Thanks, Kaak.

I am getting very close to what I require now.

The only problem is that this selects the rows below until there is a
value in a cell in column A.

I need the Rows to be selected below until there is a value in column
B.
Reply
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
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Standards or guides for documenting EXCEL calculation templates? Brutus Excel Discussion (Misc queries) 0 November 9th 06 09:39 PM
How do I use line guides Audrey Excel Worksheet Functions 1 July 21st 06 02:08 AM


All times are GMT +1. The time now is 09:44 PM.

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"