• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

Copy paste formula

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
leezac
Asked:
leezac
  • 2
  • 2
1 Solution
 
NorieVBA ExpertCommented:
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
 
leezacAuthor Commented:
That is moving the R's also
0
 
leezacAuthor Commented:
This may be OK - I need to test more.
0
 
NorieVBA ExpertCommented:
It worked on the sample data I tested it on.

Can you attach a sample workbook?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now