- Katılım
- 5 Eylül 2007
- Mesajlar
- 1,247
- Excel Vers. ve Dili
- ofis 2010
iyi günler;
Kullanmakta olduğum makroda güncelleme yapmak istiyorum.
B hücresi boş ise C hücresi B hücresine
D hücresi boş ise E hücresi D hücresine
aktarılması şeklinde güncellemek istiyorum. Teşekkürler.
Kullanmakta olduğum makroda güncelleme yapmak istiyorum.
B hücresi boş ise C hücresi B hücresine
D hücresi boş ise E hücresi D hücresine
aktarılması şeklinde güncellemek istiyorum. Teşekkürler.
Kod:
Sub test()
son = Cells(Rows.Count, 1).End(3).Row
a = Range("B3:E" & son).Value
ReDim b(1 To UBound(a), 1 To 2)
For i = 1 To UBound(a)
If a(i, 3) = "" Then
b(i, 1) = a(i, 1)
Else
b(i, 1) = a(i, 3)
End If
If a(i, 4) = "" Then
b(i, 2) = a(i, 2)
Else
b(i, 2) = a(i, 4)
End If
Next i
[B3].Resize(UBound(a), 2) = b
MsgBox "İşlem tamam.", vbInformation
End Sub
