Hello
I would need a macro that can do this show in the file I've attached.
I need a macro that can concatenate data in separate rows......
Very thanks for help![]()
Hello
I would need a macro that can do this show in the file I've attached.
I need a macro that can concatenate data in separate rows......
Very thanks for help![]()
Last edited by 823; 02-06-2015 at 12:41 PM.
This will put results on sheet2:![]()
Please Login or Register to view this content.
Duplicate thread, one response in each!
Thanks for reply
COnsidering the file I've attached; What I have to insert in "Sheet1.Range("A9")"
and in "Sheet2.Range("A1")".
I need to modify something else?
thank you
Sorry, not sure what you're asking. A9 is the top left cell of your starting data and Sheet2 is where the results are placed so either can be vared.
Sorry you.....but I'm newbe of excel macro....
so to apply the macro:
I open my file
I open Visual Basic
On sheet 1 I paste the code you've written above
I saved the file in excel-macro format,,,,
then I click "play"
But it retourns error "object needed"
thanks
Last edited by 823; 02-06-2015 at 12:52 PM.
Here are instructions for how to run a macro:
How to install your new code
- Copy the Excel VBA code
- Select the workbook in which you want to store the Excel VBA code
- Press Alt+F11 to open the Visual Basic Editor
- Choose Insert > Module
- Edit > Paste the macro into the module that appeared
- Close the VBEditor
- Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
To run the Excel VBA code:
- Press Alt-F8 to open the macro list
- Select a macro in the list
- Click the Run button
....Thanks Stephen...
It give me this error:
"Object needed/missing"
When I press alt+f8 It says
runtim error 424
object needed
Someone can help me plz?
What is Office 2015 in your office version?
I made a mistake.....I mean I have office 2007 in a pc, and in another pc, office 2013....
But In your pc, with my file attached in the first post, this string:
Does it works???Sub x()
Dim vOut(), vIn(), i As Long, n As Long
vIn = Sheet1.Range("A9").CurrentRegion.Value
ReDim vOut(1 To UBound(vIn, 1), 1 To 2)
With CreateObject("Scripting.Dictionary")
For i = 1 To UBound(vIn, 1)
If Not .Exists(vIn(i, 1)) Then
n = n + 1
vOut(n, 1) = vIn(i, 1)
vOut(n, 2) = vIn(i, 2)
.Add vIn(i, 1), n
ElseIf .Exists(vIn(i, 1)) Then
vOut(.Item(vIn(i, 1)), 2) = vOut(.Item(vIn(i, 1)), 2) & "-" & vIn(i, 2)
End If
Next i
End With
Sheet2.Range("A1").Resize(n, 2) = vOut
End Sub
In my no!! ...I retoruns 424 error / object missing
thanks for help
Last edited by 823; 02-07-2015 at 05:17 AM.
Try the attached
![]()
Please Login or Register to view this content.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
I've done jindon
THANKS!!!
.........................
I opened a new thread because I need a little mod. of this macro
http://www.excelforum.com/excel-prog...ml#post3996039
Last edited by 823; 02-21-2015 at 12:29 PM. Reason: open new thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks