Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2017, 07:59 AM
NoSparks NoSparks is offline Move text to another cell Windows 7 64bit Move text to another cell Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Maybe something along the lines of this...
Code:
With Sheets("Sheet1")
    'get last row of col A
    lr = .Cells(Rows.Count, "A").End(xlUp).Row
    'move second value
    For i = 1 To lr Step 3
        .Cells(i, 2).Value = .Cells(i + 1, 1).Value
    Next i
    'remove rows where B is blank
    .Range("B1:B" & lr).SpecialCells(xlBlanks).EntireRow.Delete
End With

Reply With Quote
  #2  
Old 06-05-2017, 09:55 AM
ewso ewso is offline Move text to another cell Windows 10 Move text to another cell Office 2016
Advanced Beginner
Move text to another cell
 
Join Date: Nov 2016
Posts: 80
ewso is on a distinguished road
Default

Quote:
Originally Posted by NoSparks View Post
Maybe something along the lines of this...
Code:
With Sheets("Sheet1")
    'get last row of col A
    lr = .Cells(Rows.Count, "A").End(xlUp).Row
    'move second value
    For i = 1 To lr Step 3
        .Cells(i, 2).Value = .Cells(i + 1, 1).Value
    Next i
    'remove rows where B is blank
    .Range("B1:B" & lr).SpecialCells(xlBlanks).EntireRow.Delete
End With
Hi..is there something missing, because I can't get the macro to run.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
extract time from a cell and move it to front of cell before text ewso Excel 20 03-19-2017 11:34 AM
Move the data at bottom cell to right side of the cell kcyag91 Excel 1 01-28-2016 12:28 AM
Move text to another cell Macro to move focus after entry in a cell Phil H Excel Programming 3 06-18-2015 01:20 PM
Move data from 1 cell to another cell Catalin.B Excel 1 06-25-2011 12:51 PM
Auto-populate an MS Word table cell with text from a diff cell? dreamrthts Word Tables 0 03-20-2009 01:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:36 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