?
Solved

Copy column two rows over

Posted on 2014-02-14
2
Medium Priority
?
132 Views
Last Modified: 2014-02-20
I need to copy over left 2 columns not one.   I need help changing this code.

 Sheets("Sheet1").Select
 Range("C1").Select
Selection.SpecialCells(xlBlanks).Delete shift:=xlToLeft
0
Comment
Question by:leezac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Assisted Solution

by:Harry Lee
Harry Lee earned 1000 total points
ID: 39860644
leezac,

do you mean these codes?

Dim I As Long
    For I = 2 To Range("J" & Rows.Count).End(xlUp).Row
        If Range("J" & I).Value <> "R" Then
            Range("I"& I).Value = Range("J" & I).Value
            Range("J" & I).Value = ""
        End If
    Next I

Open in new window


Just change it to

Dim I As Long
    For I = 2 To Range("J" & Rows.Count).End(xlUp).Row
        If Range("J" & I).Value <> "R" Then
            Range("H"& I).Value = Range("J" & I).Value
            Range("J" & I).Value = ""
        End If
    Next I

Open in new window

0
 
LVL 31

Accepted Solution

by:
gowflow earned 1000 total points
ID: 39863042
try this

Sheets("Sheet1").Select
 Range("H1").Select
Range(Selection.Offset(0, -2), Selection.Offset(0, -1)).Delete shift:=xlToLeft

Open in new window


gowflow
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question