Counting "steps"

wpryan

Well-known Member
Joined
May 26, 2009
Messages
534
Office Version
  1. 365
Platform
  1. Windows
Hi All, perhaps a dumb question... I am writing a test validation script, which is divided into various sections. I want to define the steps in the script by section number and then step number (e.g., 1.1, 1.2, 1.3 etc.) The thing that is annoying me is that after I get to step 1.9, the next number is 2.0. I want it to count to 1.10, 1.11 etc. Any idea how to do this? I don't want to format the cells as text, else I'd do the script in Word. I prefer the counting to be automated, in case I have to add/delete steps...
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
The counting is inside the vba code and denotes blocks of code? The counting is in sheet cells? I don't see how you can avoid using text in cells because 1.1 and 1.10 are the same thing as numbers. Column B row formula is =A1 & "." & ROW(), but automatically that results in text values.
1.0​
1.1
1.0​
1.2
1.0​
1.3
1.0​
1.4
1.0​
1.5
1.0​
1.6
1.0​
1.7
1.0​
1.8
1.0​
1.9
1.0​
1.10
 
Upvote 0
Solution
The counting is inside the vba code and denotes blocks of code? The counting is in sheet cells? I don't see how you can avoid using text in cells because 1.1 and 1.10 are the same thing as numbers. Column B row formula is =A1 & "." & ROW(), but automatically that results in text values.
1.0​
1.1
1.0​
1.2
1.0​
1.3
1.0​
1.4
1.0​
1.5
1.0​
1.6
1.0​
1.7
1.0​
1.8
1.0​
1.9
1.0​
1.10
Thanks for your response, I did it by adding a "reference" column and then with Concatenate
Rich (BB code):
=CONCATENATE($B$1;".";C2)
, where $B$1 is the section and A9 is the reference. It amounts to the same thing you did, and really I don't care if it's formatted text. For QA purposes I'll probably have to copy the script into Word so that any auditor won't think we're trying to cheat (**** auditors!).
Section
2​
Ref:Step
1​
2.1
2​
2.2
3​
2.3
4​
2.4
5​
2.5
6​
2.6
7​
2.7
8​
2.8
9​
2.9
10​
2.10
11​
2.11
12​
2.12
 
Upvote 0
Glad I was able to help somewhat. Thanks for the 'brownie points' !
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,268
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top