Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Macro help on Cell Selection

Hi,
Currently, i have written a macro that will select a new sheet based on
certain criteria in specific cells. i.e. if B4 contains "text" then move to
the next sheet until it finds "Complete". this is then your next sheet to
use. i now need to create something very similar but everything is to stay on
1 sheet so it need to look at the cells. If the cell contains anything, i
need to select the cell underneath which is empty. Or keep looking down a
column of cells until it finds an empty one. i hope this is understandable!

example:
range is B4 to B25. ( i need to update this column every day)
B4 contains data
B5 contains data
B6 contains nothing
therfore when i issue my macro, it will look at the B column and
automatically select the cell B6 as it contains nothing.

Is this acheivable??

Kind Regards,


Nigel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Macro help on Cell Selection

Hi Nigel,

Following code will do the job :
Application.Goto Range("B4")
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select

HTH
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Macro help on Cell Selection

Nigel,

Start the macro recorder and go through the steps that you describe. You can
then post that code and get help on modifying it to be more generic.

--
HTH

Bob Phillips

"Nigel" wrote in message
...
Hi,
Currently, i have written a macro that will select a new sheet based on
certain criteria in specific cells. i.e. if B4 contains "text" then move

to
the next sheet until it finds "Complete". this is then your next sheet to
use. i now need to create something very similar but everything is to stay

on
1 sheet so it need to look at the cells. If the cell contains anything, i
need to select the cell underneath which is empty. Or keep looking down a
column of cells until it finds an empty one. i hope this is

understandable!

example:
range is B4 to B25. ( i need to update this column every day)
B4 contains data
B5 contains data
B6 contains nothing
therfore when i issue my macro, it will look at the B column and
automatically select the cell B6 as it contains nothing.

Is this acheivable??

Kind Regards,


Nigel



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Macro help on Cell Selection

Hi,

Carims code worked fine once you have somethin in your range. Exactly what i
was looking for. Thanks Carim :)

Nigel

"Bob Phillips" wrote:

Nigel,

Start the macro recorder and go through the steps that you describe. You can
then post that code and get help on modifying it to be more generic.

--
HTH

Bob Phillips

"Nigel" wrote in message
...
Hi,
Currently, i have written a macro that will select a new sheet based on
certain criteria in specific cells. i.e. if B4 contains "text" then move

to
the next sheet until it finds "Complete". this is then your next sheet to
use. i now need to create something very similar but everything is to stay

on
1 sheet so it need to look at the cells. If the cell contains anything, i
need to select the cell underneath which is empty. Or keep looking down a
column of cells until it finds an empty one. i hope this is

understandable!

example:
range is B4 to B25. ( i need to update this column every day)
B4 contains data
B5 contains data
B6 contains nothing
therfore when i issue my macro, it will look at the B column and
automatically select the cell B6 as it contains nothing.

Is this acheivable??

Kind Regards,


Nigel




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
Line selection from a cell script through a VBA macro CamiIRE Setting up and Configuration of Excel 2 April 11th 06 04:28 PM
Macro - Dynamic cell selection Chris Excel Discussion (Misc queries) 1 January 11th 06 01:48 PM
Cell selection in a macro GatheringShadow[_2_] Excel Programming 0 October 21st 04 01:45 PM
Cell selection in a macro GatheringShadow Excel Programming 2 October 21st 04 12:33 AM
Selection.Replace doesn't update the cell value in macro! Nasser Hosseini Excel Programming 1 February 26th 04 07:41 PM


All times are GMT +1. The time now is 03:13 AM.

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

About Us

"It's about Microsoft Excel"