PC Review


Reply
Thread Tools Rate Thread

Copy, then Paste "Value" to the same cell...

 
 
Brad
Guest
Posts: n/a
 
      10th Jun 2007
I have a column A1 to A100 where names appear in the cells based on a
formula that populates them from another worksheet matching them against
account numbers using the lookup function. So, everything works well except
the other worksheet can change over time and it can foul up the "lookup"
function and post a wrong name, say where one has been deleted.

So, at the end of my existing code, I want to copy cell A1 and paste it as a
value back to itself and then repeat it for all of the cells.

My thanks in advance for any suggestions here.

Brad


 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      11th Jun 2007
Sub brad()
Set r = Range("A1:A100")
For Each rr In r
rr.Copy
rr.PasteSpecial Paste:=xlPasteValues
Next
End Sub
--
Gary''s Student - gsnu200728
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      11th Jun 2007
with worksheets("sheet999").range("a1:A100")
.value = .value
end with

Is another way.

Brad wrote:
>
> I have a column A1 to A100 where names appear in the cells based on a
> formula that populates them from another worksheet matching them against
> account numbers using the lookup function. So, everything works well except
> the other worksheet can change over time and it can foul up the "lookup"
> function and post a wrong name, say where one has been deleted.
>
> So, at the end of my existing code, I want to copy cell A1 and paste it as a
> value back to itself and then repeat it for all of the cells.
>
> My thanks in advance for any suggestions here.
>
> Brad


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a one button shortcut for "copy cell above & paste here" irishseawatcher Microsoft Excel Worksheet Functions 4 13th Jan 2010 07:35 PM
copy and paste the cell with formula ="1" HS Yong Microsoft Excel Misc 3 16th Jul 2009 10:15 AM
How can I add the icons "Delete", "Cut", "Copy" and "Paste" in Vis =?Utf-8?B?TW9vbndhbGtlcg==?= Windows Vista File Management 4 17th Sep 2007 11:02 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Microsoft Excel Misc 1 30th Jan 2006 10:01 PM
Copy Paste Problem using keyboard "cntrl C" and "cntrl V" it tries to paste image of spreadsheet AuthorizedUserPF Microsoft Excel Misc 5 11th Feb 2004 01:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:58 PM.