Solved

# Copy paste formula

Posted on 2014-02-14
170 Views
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
Question by:leezac
• 2
• 2

LVL 33

Accepted Solution

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
``````
0

Author Comment

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

Author Comment

ID: 39860380
This may be OK - I need to test more.
0

LVL 33

Expert Comment

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

Can you attach a sample workbook?
0

## Featured Post

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
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 demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.