move Value not but not Formula Excel 2010 VBA

BrayBoy

New Member
Joined
Nov 27, 2010
Messages
24
Hello,

Everyone I am working on a Golf score tracking / recording Workbook and I ran into a little bit of a Snag. I have a main page where the league manager enters the Scores on a weekly basis. I have a custom form that has Dropbox so we can change the week we are will be scoring for. I recently had to enter formula into one of cells on the main page and when I look at the Score tracking page. I noticed the formula is being copied over and I just want the Value. I thought I could use .PasteSpecial xlPasteValues. I thought I could just replace the .copy But this does not seem to be the case. Message states stating expected End statement.

thanks for the help

Code:
Sub MoveScores()
        Dim r As Range, c As Range, msg As String
        With Sheets("Main").Range("D1").CurrentRegion
            For Each r In Sheets("ScoreTracker").Range("D1:BW1")
                Set c = .Rows(1).Find(r.Value, , , xlWhole, , 0)
                If Not c Is Nothing Then
                    .Columns(c.Column).Copy r
                    
                Else
                    msg = "ScoreTracker has been updated"
                End If
            Next
            Application.CutCopyMode = False
        End With
       If Len(msg) Then MsgBox msg
    End Sub
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Well I had all the pieces... and Almost figured it... But in the end a Guru from another page showed me the errors of my way. So to move and not copy the code has to be changed to this...
Code:
If Not c Is Nothing Then
                   .Columns(c.Column).Copy
                   r.PasteSpecial Paste:=xlPasteValues
 
Upvote 0

Forum statistics

Threads
1,213,490
Messages
6,113,956
Members
448,535
Latest member
alrossman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top