Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dev dev is offline
external usenet poster
 
Posts: 66
Default Sequential number within excel

Please see the data below

a b c
000000080672 EI0G18 1.00
EIVH38 1.00
EIVK38 1.00
000000082585 EIRH69 1.00
EIRK69 1.00

the first 3 items in column B belongs to the first item in column a.
Accordingly the next 2 items in col "b" belongs to the next item in col "A".
I want to number the first item in col "A" as 1 and the 3 items in col "B" as
1.1, 1.2 1.3 and accordingly, the next item in col "a" as number 2 and
accordingly the item 4 and 5 in col "b" as 2.1 & 2.2 and so on.....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Sequential number within excel

Number them where?

Using a Macro?

--
Regards,
Tom Ogilvy


"Dev" wrote:

Please see the data below

a b c
000000080672 EI0G18 1.00
EIVH38 1.00
EIVK38 1.00
000000082585 EIRH69 1.00
EIRK69 1.00

the first 3 items in column B belongs to the first item in column a.
Accordingly the next 2 items in col "b" belongs to the next item in col "A".
I want to number the first item in col "A" as 1 and the 3 items in col "B" as
1.1, 1.2 1.3 and accordingly, the next item in col "a" as number 2 and
accordingly the item 4 and 5 in col "b" as 2.1 & 2.2 and so on.....

  #3   Report Post  
Posted to microsoft.public.excel.programming
dev dev is offline
external usenet poster
 
Posts: 66
Default Sequential number within excel

Is there a way to number them in col "D".

"Dev" wrote:

Please see the data below

a b c
000000080672 EI0G18 1.00
EIVH38 1.00
EIVK38 1.00
000000082585 EIRH69 1.00
EIRK69 1.00

the first 3 items in column B belongs to the first item in column a.
Accordingly the next 2 items in col "b" belongs to the next item in col "A".
I want to number the first item in col "A" as 1 and the 3 items in col "B" as
1.1, 1.2 1.3 and accordingly, the next item in col "a" as number 2 and
accordingly the item 4 and 5 in col "b" as 2.1 & 2.2 and so on.....

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Sequential number within excel

Sub number_items()
Dim imajor As Long, iminor As Long
Dim rng As Range, cell As Range
imajor = 0
iminor = 0
Set rng = Range(Cells(1, "B"), _
Cells(Rows.Count, "B").End(xlUp))
For Each cell In rng
If Not IsEmpty(cell.Offset(0, -1)) Then
imajor = imajor + 1
iminor = 1
End If
cell.Offset(0, 2).Value = "'" & imajor _
& "." & iminor
iminor = iminor + 1
Next
End Sub

Test this on a copy of your data. I assume the 1.0 are in column C. and
column a has some blank cells in it (your labels in the post are a little
off).

--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote:

Number them where?

Using a Macro?

--
Regards,
Tom Ogilvy


"Dev" wrote:

Please see the data below

a b c
000000080672 EI0G18 1.00
EIVH38 1.00
EIVK38 1.00
000000082585 EIRH69 1.00
EIRK69 1.00

the first 3 items in column B belongs to the first item in column a.
Accordingly the next 2 items in col "b" belongs to the next item in col "A".
I want to number the first item in col "A" as 1 and the 3 items in col "B" as
1.1, 1.2 1.3 and accordingly, the next item in col "a" as number 2 and
accordingly the item 4 and 5 in col "b" as 2.1 & 2.2 and so on.....

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Sequential number within excel

Using Formulas it Would look something like this:
Columns D
=IF(ROW()=2;1;IF(A2<"";D1+1;D1))
Column E
= IF(ROW()=2;1;E1+1)
Column F
= D2&"."&E2

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
I need to Sequential number an excel 2000 template. Jdean Excel Programming 2 March 9th 06 06:56 PM
need help w/sequential invoice number on excel worksheet Landfillpark Excel Worksheet Functions 1 March 3rd 06 11:48 PM
How do I Auto Number a field in Excel - sequential PO# Melinda Excel Worksheet Functions 1 November 30th 05 09:00 PM
Can you automatically insert next sequential number in an excel fo jo_9865 Excel Discussion (Misc queries) 2 August 4th 05 10:58 PM
unique sequential number excel 2000 Ches Excel Discussion (Misc queries) 0 May 13th 05 10:55 PM


All times are GMT +1. The time now is 11:38 PM.

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

About Us

"It's about Microsoft Excel"