Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 03-07-2018, 11:08 PM
ChrisOK ChrisOK is offline IF adjacent cell empty Copy from Other Column Windows 7 64bit IF adjacent cell empty Copy from Other Column Office 2016
Advanced Beginner
IF adjacent cell empty Copy from Other Column
 
Join Date: Sep 2016
Posts: 54
ChrisOK is on a distinguished road
Question

Like this? Changing this row:
Code:
If Cells(i, 9).Value = "<>" Then Cells(i, 9).Value = Cells(i, 5).Value


To this?
Code:
If Cells(i, 9).Value = <>"" Then Cells(i, 9).Value = Cells(i, 5).Value

It does not seem to be acceptable -- it turns red
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, 5).Value = Cells(i, 9).Value Next i End With Columns(9).NumberFormat = "mm/dd/yyyy" End Sub
IF Col I (9) is NOT empty, THEN copy/paste whatever is sitting in Col I (9) into adjacent Col E (5)

Last edited by ChrisOK; 03-07-2018 at 11:12 PM. Reason: expansion
Reply With Quote
 

Tags
if empty copy adjacent



Similar Threads
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
IF adjacent cell empty Copy from Other Column How to conditionally format cells in Col. A if it matches adjacent cell in Col. B? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft