Place in A1 the value generated by formula in B1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Place in A1 the Value generated by a formula in B1. A1 can not contain a
formula.
B1 may, or may not, display its formula result.
 
Place this code into the code for the sheet you want. Right click on the tab
and choose view code..

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Range("A1").Value = ActiveSheet.Range("B1").Value
End Sub

HTH
 
Try something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = $B$1
ActiveSheet.Range("A1") = ActiveSheet.Range("B1")
End If
End Sub
 
Thanks to you and Jim

My looping problem went away ???????
Further search for "macro protection" found the reason for the looping.
Had to do with locking and protection.
The search also explained how to protect macro/VBA code.

Both of the approaches ,modified for arrays, did what I wanted to do.
I also use macros, with control keys, to execute Copy/Paste Special/Values
to move formula generated Golf Player arrays to other non-formula containing
arrays.
This is a comprehensive Golf scoring program.

Thanks for all the help.

Bob Carter
Douglas,MA
 

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