Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default Formula/Macro Question

On Nov 12, 9:34*am, Don Guillett wrote:
On Nov 12, 8:29*am, Don Guillett wrote:



On Nov 11, 11:49*am, carl wrote:


My data table looks like this:


Router *Name
ABC * * QQQ
ABC * * SPY
ABC * * GOOG
EFG * * QQQ
EFG * * GOOG


I m trying to create this table:


Name * *Router
QQQ * * ABC,EFG
SPY * * ABC
GOOG * *ABC,EFG


Thanks in advance.


This does it
Sub lineemupSAS()Dim lr As LongDim lc As LongDim i As Mailer


Range("router").Copy Range("a1")lr = Cells(Rows.Count,
1).End(xlUp).RowColumns(2).CutColumns(1).InsertRan ge("A2:B" & lr).Sort
Key1:=Range("a2"), Order1:=xlAscending, _Header:=xlGuess,
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
**For i = lr To 1 Step -1If Cells(i + 1, 1) = Cells(i, 1) Then*lc =
Cells(i, Columns.Count).End(xlToLeft).Column + 1*Cells(i + 1, 2).Copy
Cells(i, lc)*Rows(i + 1).DeleteEnd IfNext iEnd Sub


word wrap fixed
==========
sub lineemupSAS()
Dim lr As Long
Dim lc As Long
Dim i As long

lr = Cells(Rows.Count, 1).End(xlUp).Row
Columns(2).CutColumns(1).Insert
Range("A2:B" & lr).Sort Key1:=Range("a2"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
For i = lr To 1 Step -1
If Cells(i + 1, 1) = Cells(i, 1) Then
*lc = Cells(i, Columns.Count).End(xlToLeft).Column + 1
*Cells(i + 1, 2).Copy Cells(i, lc)
*Rows(i + 1).Delete
End If
Next i
End Sub- Hide quoted text -

- Show quoted text -


thanks
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
Excel Macro or Formula Question carl Excel Worksheet Functions 1 October 22nd 11 02:55 PM
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Macro Question formula Juan Carlos[_2_] Excel Discussion (Misc queries) 8 September 29th 09 05:47 PM
Formula Macro Question MikeD1224 Excel Discussion (Misc queries) 1 February 23rd 07 07:09 PM
Excel Formula/Worksheet maybe Macro Question Todd Beauchemin Excel Worksheet Functions 3 June 18th 05 05:18 AM


All times are GMT +1. The time now is 05:47 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"