![]() |
#5
|
|||
|
|||
![]()
I found that the reverse was needed and thought it would be easy to revert using the "<>" and changing the column refcs - but it's not working for some reason? Hoping someone can see what I'm missing?
IF Col I (9) is NOT empty, THEN copy/paste that date that's sitting in I (9) into adjacent Col E (5) Code:
Sub CopyandPaste() Dim LR As Long Dim i As Long With ActiveSheet LR = .Range("I" & Rows.Count).End(xlUp).Row For i = 2 To LR If Cells(i, 9).Value = "<>" Then Cells(i, 9).Value = Cells(i, 5).Value Next i End With Columns(9).NumberFormat = "mm/dd/yyyy" End Sub |
Tags |
if empty copy adjacent |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Increase number in cell, based on value in adjacent cell | scottyb | Excel | 3 | 02-02-2017 03:51 AM |
If column B cell is a certain value then copy and paste the value to column A | Snaybot | Excel Programming | 1 | 12-01-2015 07:10 PM |
Data validation,force cell to be filed with number if respective cell is not empty | nicholes | Excel Programming | 0 | 08-01-2015 09:08 AM |
![]() |
alshcover | Excel | 2 | 06-03-2014 12:50 PM |
Conditional Formatting Expiration Dates Based on Text in Adjacent Cell | Frogggg | Excel | 1 | 10-25-2011 08:44 PM |