Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Place in A1 the value generated by formula in B1

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Place in A1 the value generated by formula in B1

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

"Trebor Retrac" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Place in A1 the value generated by formula in B1

Thanks Jim:

The routine worked to transfer the value.
However, once started , the routine appears to not stop after the first
ececution.
I have to use the escape key to break the routine and then end it.
Ther must be some way to make the routine execute only once for each change
of value in "B1".
I am not familiar with Visual Basic but am quite familiar with C++.
I modified the cell declarations to array values "A1:C160" and "F1:H160",
which is what I really want to do, and still the got the eternal looping of
the routine.

Thanks
Bob Carter
Douglas, MA

"Jim Thomlinson" wrote:

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

"Trebor Retrac" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Place in A1 the value generated by formula in B1

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




"Montrose77" wrote:


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


--
Montrose77
------------------------------------------------------------------------
Montrose77's Profile: http://www.excelforum.com/member.php...o&userid=18191
View this thread: http://www.excelforum.com/showthread...hreadid=346544


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
Sorting values generated by a formula... Randy L Excel Discussion (Misc queries) 1 August 17th 07 04:00 PM
Why does Excel not multiply a number generated by an IF formula? Free Ishii Excel Worksheet Functions 5 June 21st 07 01:30 PM
Hiding the results of a formula generated from a blank cell Will Emms[_2_] Excel Discussion (Misc queries) 4 April 18th 07 05:18 PM
How do I round a formula generated number texasdutch Excel Worksheet Functions 6 April 5th 07 08:14 PM
Filename in a formula generated automatically? helptildette Excel Discussion (Misc queries) 1 July 15th 06 12:20 AM


All times are GMT +1. The time now is 03:25 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"