Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Plading a value in a cell 2

Status
Not open for further replies.

shytott

Technical User
Aug 25, 2003
131
GB
Hi
If I have a summed value in cell A5 is there anyway to place that value into C5 but without having the formula '=A5' in C5. What Im wanting to do is to have a macro button which will make A5 and C5 be at the same value but only when the button has been pressed - otherwise with =A5, it will be continually updated.

Hope thats not too double dutch!

Many Thanks
 



Hi,
[c]
sub GetValue()
with Sheets("YourSheetName")
.[C5].Value = .[A5].Value
end with
end sub
[/c]
copy and paste into a VBA module.

Place a Forms button on your sheet and Assign this procedure

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Cheers Skip

You came up Trumphs again! That works perfectly



White605,
I had tried recording a macro doing the job manually, but it always left a formula in C5 and not just the integer value of A5. Thanks for replying.
 
If you want to do this by recording a macro, try using "paste special, value" instead of just pasting. Might help.
 
Spot on Lionel, that works a treat too - I knew there'd be some way of doing it by recordable actions. Ive learned something new about Paste Special too.

Much Obliged

Shytott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top