#1   Report Post  
abcd
 
Posts: n/a
Default

Public Sub Group()
Dim a$, b$, i&
' starting with A1 but you can change it below
With Range("A1")
a$ = .Value
b$ = .Offset(0, 1).Value
i = .Row + 1: j = .Column
End With
next_a$ = Cells(i, j).Value
next_b$ = Cells(i, j + 1).Value

While next_a$ < ""
Rows(i).Select
If ((a = next_a) And (b = next_b)) Then
Cells(i - 1, j + 2).Value = Cells(i - 1, j + 2).Value & "/" &
Cells(i, j + 2).Value
Rows(i).Delete
Else
a = next_a
b = next_b
i = i + 1
End If
next_a$ = Cells(i, j).Value
next_b$ = Cells(i, j + 1).Value
Wend
End Sub
  #2   Report Post  
Greshter
 
Posts: n/a
Default

abcd

That was on the money.

Many thanks and great bit of code.

Cheers,
Mike

  #3   Report Post  
abcd
 
Posts: n/a
Default

ok but just note that the

Rows(i).Select

was onlu for test purpose, no need to it
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
"Query cannot be edited by the Query Wizard" PancakeBatter Excel Discussion (Misc queries) 0 April 25th 05 05:59 PM
Excel2000 ODBC query oddity Arvi Laanemets Excel Discussion (Misc queries) 0 March 10th 05 06:35 AM
Query of External Data Excel GuRu Excel Discussion (Misc queries) 2 January 3rd 05 07:43 PM
Microsoft Query Help Patti Excel Worksheet Functions 4 December 25th 04 09:54 AM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 04:52 AM.

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"