?
Solved

Excel VBA Loop to count and number rows

Posted on 2014-11-18
1
Medium Priority
?
218 Views
Last Modified: 2014-11-18
I am trying to put together some VBA code to number a spreadsheet rows until a change in a date in an adjacent column makes the numbering start over again.

The attached file shows the basics for it....

Looping may not be the way to go, it is slow and tedious..... If someone has a better way I would be more than happy to review....
Row-Count.xlsx
0
Comment
Question by:DougDodge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 2000 total points
ID: 40450139
Does it have to be VBA code?

Why not (if "Count" starts In cell C2).

=if(b2<>b1,1,c1+1)

And copy that down,
0

Featured Post

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
Gain an elementary understanding of Blockchain technology.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question