Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default macro to apply only to even number rows and NonBlank cells

I want a macro to be useable only on even number rows, AND
NonBlankcells. I need something like an If Then statement? Like If
ActiveCell.Row _______ Then Exit Sub? Thank you for your help.

Tonso
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default macro to apply only to even number rows and NonBlank cells

if activecell.row mod 2 = 0 then
'it's an even row


if isempty(activecell.value) then
'it's empty



Billy wrote:

I want a macro to be useable only on even number rows, AND
NonBlankcells. I need something like an If Then statement? Like If
ActiveCell.Row _______ Then Exit Sub? Thank you for your help.

Tonso


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default macro to apply only to even number rows and NonBlank cells

On Apr 22, 9:05*am, Dave Peterson wrote:
if activecell.row mod 2 = 0 then
* 'it's an even row

if isempty(activecell.value) then
* 'it's empty

Billy wrote:

I want a macro to be useable only on even number rows, AND
NonBlankcells. I need something like an If Then statement? Like If
ActiveCell.Row _______ Then Exit Sub? Thank you for your help.


Tonso


--

Dave Peterson


Thanks so very much Dave. Works perfect! You MVPs [and of course some
non-MPVs also) sure add value to Excel!

Thanks again,

Tonso
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
Calculate number of rows and apply formula Grey Old Man[_2_] Excel Discussion (Misc queries) 4 March 15th 10 07:17 PM
Macro that sums cells in rows of varible number and.... blazzzercat Excel Programming 2 December 28th 06 10:32 PM
count the number of nonblank cells within a range Hervinder Excel Programming 1 May 9th 06 03:37 PM
How do I count nonblank cells in rows within Excel? JoJo New Users to Excel 1 February 14th 06 04:11 PM
Apply Excel Program to a Number of Rows Carlton Excel Programming 2 April 21st 05 09:03 AM


All times are GMT +1. The time now is 06:42 PM.

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"