Paste value

hujenx

New Member
Joined
Feb 9, 2009
Messages
25
I have 2 sheets - Certificate (Sheet1) & ListOfProjects (Sheet2)
and am trying to test col K values in the Sheet2 against 2 cell values in Sheet1 and if true then paste a value from Sheet1 into col L of the same row (as the tested col K cell) in Sheet2.

I've used similar to the below before to do that, but in this case it just doesn't seem to work - what am I missing?


Sub DateStamp()


Dim N As Integer

For N = 10 To N = 638

If Sheets("ListOfProjects").Range("K" & N) < Range("Certificate!C8").Value Then
If Sheets("ListOfProjects").Range("K" & N) > Range("Certificate!C9").Value Then

Sheets("ListOfProjects").Range("L" & N) = Range("Certificate!C8").Value

End If
End If

Next N


End Sub
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Thanks so much. When I look back again at the code that worked before that's so, don't know how I came to change it & didn't notice!
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,820
Members
452,946
Latest member
JoseDavid

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