DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
EĞER(V2="";"";BİRLEŞTİR(Q2&" "&R2&" "&"NO"&":"&S2&"/"&T2&" "&U2&"/"&V2)) formülü ile yapabildiğim birleştirme makro ile olabilir mi?
Saygılarımla...
Sub Birlestir()
Dim i As Long, son As Long, Wf As WorksheetFunction, j As Byte
Set Wf = WorksheetFunction
son = [Q:V].Find("*", , , , xlByRows, xlPrevious).Row
Range("L2:L" & Rows.Count).ClearContents
For i = 2 To son
If Wf.CountA(Range("Q" & i & ":V" & i)) > 0 Then
For j = 17 To 22
Cells(i, "L") = Cells(i, "L") & " " & Cells(i, j)
Next j
End If
Next i
End Sub
Hocam ilgilendiğiniz için can-ı gönülden teşekkürler...
L sütunu kayıt yeri,kaydedilenler silinmeyecek;sadece Q:V arasındaki veriler kaydedildikten sonra silinecek..
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim deg As String
If Intersect(Target, Range("P2:P" & Rows.Count)) Is Nothing Then Exit Sub
With Target
If WorksheetFunction.CountA(Range("Q" & .Row & ":V" & .Row)) = 0 Then Exit Sub
deg = Cells(.Row, "Q") & " " & Cells(.Row, "R") & "No:" & Cells(.Row, "S") & "/" & _
Cells(.Row, "T") & " " & Cells(.Row, "U") & "/" & Cells(.Row, "V")
Cells(.Row, "L") = deg
Range("Q" & .Row & ":V" & .Row).ClearContents
End With
End Sub
Sn. Ömer hocam oluşturduğunuz makroyu kendi programıma eklediğimde hata veriyor;anladığım kadarıyla benzer kodlamalar var..Nasıl ekleyeceğim hocam yardımcı olurmusunuz?..
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("a2:a" & [a65536].End(3).Row)) Is Nothing Then
If Target <> "" Then
Cancel = True
Application.ScreenUpdating = False
Set wd = CreateObject("Word.Application")
Set wddoc = wd.Documents.Add(DocumentType:=0)
wd.Visible = True
For x = 5 To 13
metin = metin & Chr(10) & Cells(1, x) & ": " & Cells(Target.Row, x)
Next
With wd.Selection.PageSetup
.PageWidth = wd.CentimetersToPoints(21)
.PageHeight = wd.CentimetersToPoints(14.8)
End With
wd.Selection = metin
yol_ds = ThisWorkbook.Path & "\" & Target & "-" & Cells(Target.Row, 8) & "-" & Cells(Target.Row, 2) & ".doc"
wddoc.SaveAs yol_ds
wddoc.Application.Quit
MsgBox "Aktarma tamamlanmıştır.", vbInformation, "Şakir ÖZKAN"
End If
End If
If Not Intersect(Target, Range("b1")) Is Nothing Then
Cancel = True
For y = 2 To [g65536].End(3).Row
Cells(y, 2) = WorksheetFunction.CountIf(Range("g2:g" & y), Cells(y, 7))
Next
End If
[COLOR=red]Dim deg As String[/COLOR]
[COLOR=red]If Not Intersect(Target, Range("P2:P" & Rows.Count)) Is Nothing Then[/COLOR]
[COLOR=red] With Target
If WorksheetFunction.CountA(Range("Q" & .Row & ":V" & .Row)) = 0 Then Exit Sub
deg = Cells(.Row, "Q") & " " & Cells(.Row, "R") & "No:" & Cells(.Row, "S") & "/" & _
Cells(.Row, "T") & " " & Cells(.Row, "U") & "/" & Cells(.Row, "V")
Cells(.Row, "L") = deg
Range("Q" & .Row & ":V" & .Row).ClearContents
End With
End If[/COLOR]
End Sub