|
20.04.2013., 13:49 | #1 |
Premium
Datum registracije: Oct 2007
Lokacija: Zagreb
Postovi: 347
|
Excel VBA help
Ljudi, imam jednu stvar koja mi se čini poprilično jednostavna, za nekoga tko je "doma" u VBA-u. Dakle, imam ovakvu tablicu: Code:
A | B /C | D /E | F G | H /I | J K | L Gornji primjer bi nakon apliciranja macroa izgledao ovako: Code:
A | B | /C | D | /E | F G | H | /I | J K | L |
30.07.2013., 09:49 | #2 |
Premium
Datum registracije: Mar 2009
Lokacija: Zagreb
Postovi: 41
|
Ako ti jos uvijek treba ... Code:
Sub pcex() Dim rng As Range Dim i As Integer Selection.CurrentRegion.Select For Each rng In Selection If InStr(rng.Text, "/") > 0 Then Range(Cells(rng.Row, 1), Cells(rng.Row, 1).End(xlToRight)).Select Selection.Copy i = Cells(rng.Row - 1, 1).End(xlToRight).Column Cells(rng.Row - 1, i + 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False rng.EntireRow.Delete End If Next End Sub također pretpostavka je da se krece od prve columne ... ako ne javi pa editiram kod |
|
|
Oglas
|
|
|
|