p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Microsoft Office > Excel VBA > Excel VBA
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 8th, 2006, 12:04 PM
Authorized User
Points: 280, Level: 5
Points: 280, Level: 5 Points: 280, Level: 5 Points: 280, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 65
Thanks: 6
Thanked 0 Times in 0 Posts
Default Counting Number of Rows Between Data Range

Hello all:

I am trying to perform a count of rows between a data range.
I have A:2 which has "attending" in the cell. I have A:1455 that
has "officer" in it. A:2566 is the last data cell and A:2567 is empty. I would like to count from Row 3 to Row 1454, the number of rows and then from Row 1456 to Row 2566, the number of rows. No matter what I try, it fails.

Any insight would be appreciated.

Thanks,
Tony

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old September 14th, 2006, 07:58 PM
Authorized User
Points: 280, Level: 5
Points: 280, Level: 5 Points: 280, Level: 5 Points: 280, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 65
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Any ideas?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old September 15th, 2006, 06:44 AM
Authorized User
 
Join Date: Mar 2006
Location: London, , United Kingdom.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try the following
Code:
dim longAtending as long
dim longofficer as long

'assuming there is an empty cell before "Officer"
longattending = cells(3,1).end(xldown).row - 3 

'-3 because whole list starts at A3, and -2 because one blank row then Officer 
longofficer = cells(longattending + 2,1).end(xldown).row -(longattending-3-2)

air coded so forgive any mistakes.. if there is no blank row before officer, then you need to alter the code a bit

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old September 16th, 2006, 03:03 PM
Authorized User
Points: 280, Level: 5
Points: 280, Level: 5 Points: 280, Level: 5 Points: 280, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 65
Thanks: 6
Thanked 0 Times in 0 Posts
Default



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old September 16th, 2006, 03:05 PM
Authorized User
Points: 280, Level: 5
Points: 280, Level: 5 Points: 280, Level: 5 Points: 280, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 65
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Excuse my last blank post. I hit the touchpad with my thumb by accident.
It is a touchy devil.

Thank you for the advice. I will give it a try.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old September 18th, 2006, 07:18 AM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.dotxls.com/excel-security...rotected-sheet

go through this url u can find solution
do r&d def u can get

Thanks&Regards
Kotaiah.K
91+9867814180

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #7 (permalink)  
Old September 21st, 2006, 08:17 AM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ekkadannakuttakanipistepoinakumundakodakapukuloelu pettukoranakodaka

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting rows in Excel worksheet Tethys BOOK: Access 2003 VBA Programmer's Reference 1 December 18th, 2007 04:38 AM
Counting number of spaces in a line Suomi Access VBA 3 September 9th, 2005 03:34 PM
Number range using JavaScript busher Classic ASP Basics 1 December 14th, 2004 08:35 PM
Prime Number Counting. Help!! ajm235 C++ Programming 3 August 27th, 2004 01:00 PM
Determine the number of data rows in a sheet ashu_gupta75 Excel VBA 1 July 31st, 2004 04:10 PM



All times are GMT -4. The time now is 12:01 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc