Solved

Copy paste formula

Posted on 2014-02-14
4
172 Views
Last Modified: 2014-02-14
I need a way to move values in Column J  to the left (1 cell over) if the value in J is not an "R".  The value I want to move is a number.
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
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
Norie earned 500 total points
ID: 39860267
Try.
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

0
 

Author Comment

by:leezac
ID: 39860342
That is moving the R's also
0
 

Author Comment

by:leezac
ID: 39860380
This may be OK - I need to test more.
0
 
LVL 34

Expert Comment

by:Norie
ID: 39860383
It worked on the sample data I tested it on.

Can you attach a sample workbook?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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 use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

719 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