Macro Code Help

  • Thread starter Thread starter amirstal
  • Start date Start date
A

amirstal

I have this formula where cell D10=B10+C10.
I want to create a macro that once I run it, cell B10 takes the value
that is in cell D10 (while the above formula remains intact).
How can I do it?

Thanks.
 
I did a little search and found this. Let me know if it helps

From: Jan Paulsen - view profile
Date: Sat, Dec 14 2002 5:00 pm
Email: "Jan Paulsen" <[email protected]>
Groups: microsoft.public.excel.programming
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author






I'm trying to copy a range of cells to another part of an ActiveSheet.
I tried this but it's copying the formula and all I want to copy is the
results. Could someone give me suggestions as to want I need to add or
change.
ActiveSheet.Range("C9:C156").Copy _
Destination:=ActiveSheet.Range("C274")

Donald



Hi Donald,

I just tried the following, which should be what you need:


Sub test()
Range("B4:B7").Copy
Range("D4").PasteSpecial xlPasteValues


End Sub


BR,


Jan
 
Sub makevalues()'Hilite the cells in D to change
For Each c In Selection
c.Offset(, -2).Value = c
Next c

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top