macro to not copy/paste formula over into other worksheet

bluepenink

Well-known Member
Joined
Dec 21, 2010
Messages
585
Hello
I have the following macro that takes that data from master worksheet and when user hits the button "next persn" it takes the data and stores it into the results worksheet
macro

Code:
Sub RetrieveVoter()
    Application.Range("StartRow").Value = Application.Range("StartRow").Value + 1
End Sub
Sub MoveData()
    Dim lngLastRow As Long
 
    lngLastRow = Sheets("Results").Range("C65536").End(xlUp).Row + 1
 
    For MoveInfo = 1 To 10
        Sheets("Results").Range("C" & lngLastRow).Value = Sheets("Master").Range("D8").Value
        Sheets("Results").Range("D" & lngLastRow).Value = Sheets("Master").Range("D9").Value
        Sheets("Results").Range("E" & lngLastRow).Value = Sheets("Master").Range("D10").Value
        Sheets("Results").Range("F" & lngLastRow).Value = Sheets("Master").Range("E9").Value
        Sheets("Results").Range("G" & lngLastRow).Value = Sheets("Master").Range("F9").Value
        Sheets("Results").Range("H" & lngLastRow).Value = Sheets("Master").Range("G9").Value
        Sheets("Results").Range("I" & lngLastRow).Value = Sheets("Master").Range("H9").Value
        Sheets("Results").Range("J" & lngLastRow).Value = Sheets("Master").Range("I9").Value
        Sheets("Results").Range("K" & lngLastRow).Value = Sheets("Master").Range("J9").Value
    Next
        Application.Range("CustomResponses").ClearContents
    RetrieveVoter
    MsgBox "Successfully transfered to the Results worksheet.", vbInformation, "Moved"
End Sub

ISSUE:
whenever i hit the button "next person" it takes formula i have stored in range E9:J9 and makes it blank.....can the macro paste special values or something and not take the formula in my range?? can someone pls help!!!

thx u
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
In Application.Range("CustomResponses").ClearContents, where is the custom range CustomResponses referring to?
 
Upvote 0
Hello

it is that range where i have my vlookup stored

CustomResponses=Master!$E$9:$K$9

i want the values from there pasted over, which is fine...but i want the formula in those cells to remain as is....do you follow? thx u so much
 
Upvote 0
yes, I do follow. Just remove this line:

Application.Range("CustomResponses").ClearContents

and that's it.
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

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