Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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..... |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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..... |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I need to Sequential number an excel 2000 template. | Excel Programming | |||
need help w/sequential invoice number on excel worksheet | Excel Worksheet Functions | |||
How do I Auto Number a field in Excel - sequential PO# | Excel Worksheet Functions | |||
Can you automatically insert next sequential number in an excel fo | Excel Discussion (Misc queries) | |||
unique sequential number excel 2000 | Excel Discussion (Misc queries) |