Need a function that will put the sum of a formula in a different

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

Guest

Hey all =). I'm not sure if my subject line makes sense, so here is an
example of what I want to do =). Lets say I just want =A1+A2, but I dont
want that sum to appear in the formula 's cell, lets say I want the answer to
appear in b1 (and no I don't want to put the formula in b1 or use the hide
formulas option =). Thanks in advance =)
 
havoc,

You could use the worksheet's change event. Copy the code below,
right-click the sheet tab, select 'View Code' and paste the code in the
window that appears.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Range("B1").Value = Range("A1").Value + Range("A2").Value
Application.EnableEvents = True
End Sub
 
Take a look at the camera option, you might find it does what you want.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
No, I am talking about the button that you can find in
Tools>Customize>Commands>Tools. Clicking this and selecting a cell allows
you to drag any image of a cell to any other cell.

For instance, you could have an image of AA1 in A1. AA1 contains a nformula,
say =IF(A1="Y","Yes you can","No you can't"), and then type Y or N in A1,
and you will see that text. Cute!

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top