MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Formula Needed Please!


Posted by Debbie G. on February 07, 2002 6:40 AM

What kind of formula can I use that will add two rows together and put the resulting answer in one of those two rows? Example: A1=5, B1=10. I would want A1 to show 15.

Thanks!


Posted by Mark W. on February 07, 2002 6:54 AM

Can't be done with an Excel formula...

A cell cannot contain both a formula and a
constant value.

Posted by Larry on February 07, 2002 7:08 AM

Re: Can't be done with an Excel formula...

***** Not really sure what you are asking for here as your example was actually two colums, but: =5+B1

Posted by Mark W. on February 07, 2002 7:12 AM

Not my posting [nt]

Posted by Debbie G. on February 07, 2002 7:28 AM

Re: Can't be done with an Excel formula...

:Oops. Example was supposed to be rows but doesn't really matter. I have put in the answer you gave, but it doesn't work when I want to drag the formula across the row. In the answer you gave, the "5" remains the same for each cell and the B1 changes accordingly. I need the number in the primary cell to remain unchanged but add the additional row to it. Sounds like it can't be done?

***** Not really sure what you are asking for here as your example was actually two colums, but: =5+B1

Posted by Tommy Bak on February 07, 2002 1:02 PM

Hi
It can't be done with a formula, but you can copy your second row and then "paste special" and checkmark "ADD". This will add the values from the second row to the values in the first row
Tommy

Posted by Brian on February 07, 2002 1:24 PM

You need to get into VBA to work this one Debbie. It is simple enough in there, but I am not sure if you want to get to that level. There is no other way.

Posted by Debbie G. on February 08, 2002 12:03 PM

THANK YOU! That is exactly what I was looking for. You have saved my wrist from falling off based on the old way I was doing it!!!! Hi