Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Copy, then Paste "Value" to the same cell...

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Copy, then Paste "Value" to the same cell...

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Copy, then Paste "Value" to the same cell...

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a one button shortcut for "copy cell above & paste here" irishseawatcher Excel Worksheet Functions 4 January 13th 10 07:35 PM
copy and paste the cell with formula ="1" HS Yong Excel Discussion (Misc queries) 3 July 16th 09 10:15 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
problem with Linking workbooks via "copy" and "paste link" Arkitek Excel Discussion (Misc queries) 0 December 19th 06 10:03 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM


All times are GMT +1. The time now is 05:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"