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

H

havocdragon

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 =)
 
B

Bernie Deitrick

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
 
B

Bob Phillips

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)
 
B

Bob Phillips

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)
 

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

Top