ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function within a cell that has a number (https://www.excelbanter.com/excel-worksheet-functions/204157-function-within-cell-has-number.html)

Té

Function within a cell that has a number
 
I have a number in a1 which is 500. Is there a way I can leave the 500 in
place, along with add a formula to that cell as well. I want to add a1+b1,
but I want to keep the 500 there. I know alt + enter goes down to the next
line, but when I insert the formula it doesnt work.

Need Help on axis problem in a chart[_2_]

Function within a cell that has a number
 
if you leave the 500 in the same cell, how are u going to show your result of
the function? explain

"Té" wrote:

I have a number in a1 which is 500. Is there a way I can leave the 500 in
place, along with add a formula to that cell as well. I want to add a1+b1,
but I want to keep the 500 there. I know alt + enter goes down to the next
line, but when I insert the formula it doesnt work.


Té

Function within a cell that has a number
 
I want the result to go below the number or next to it some how

"Need Help on axis problem in a chart" wrote:

if you leave the 500 in the same cell, how are u going to show your result of
the function? explain

"Té" wrote:

I have a number in a1 which is 500. Is there a way I can leave the 500 in
place, along with add a formula to that cell as well. I want to add a1+b1,
but I want to keep the 500 there. I know alt + enter goes down to the next
line, but when I insert the formula it doesnt work.


RAZ

Function within a cell that has a number
 
try this:
=500&A1+A2

If you want space between two then use this

=500&" "&A1+A2

You can add as many equations or text as u like, just add &

Let me know it it worked


Té

Function within a cell that has a number
 
When I tried that it said it was a circular reference and it came back 0

"Raz" wrote:

try this:
=500&A1+A2

If you want space between two then use this

=500&" "&A1+A2

You can add as many equations or text as u like, just add &

Let me know it it worked


RAZ

Function within a cell that has a number
 
hmm, it works fiine in mine, are you using excel 2007?

try adding brackets and quatation signs, for example
="500"&(A1+A2)


"Té" wrote:

When I tried that it said it was a circular reference and it came back 0

"Raz" wrote:

try this:
=500&A1+A2

If you want space between two then use this

=500&" "&A1+A2

You can add as many equations or text as u like, just add &

Let me know it it worked


Té

Function within a cell that has a number
 
I'm using 07. I tried that also and it didnt work

"Raz" wrote:

hmm, it works fiine in mine, are you using excel 2007?

try adding brackets and quatation signs, for example
="500"&(A1+A2)


"Té" wrote:

When I tried that it said it was a circular reference and it came back 0

"Raz" wrote:

try this:
=500&A1+A2

If you want space between two then use this

=500&" "&A1+A2

You can add as many equations or text as u like, just add &

Let me know it it worked


Té

Function within a cell that has a number
 
I just tried it on 03 and it didnt work either it returned 5000 back

"Raz" wrote:

hmm, it works fiine in mine, are you using excel 2007?

try adding brackets and quatation signs, for example
="500"&(A1+A2)


"Té" wrote:

When I tried that it said it was a circular reference and it came back 0

"Raz" wrote:

try this:
=500&A1+A2

If you want space between two then use this

=500&" "&A1+A2

You can add as many equations or text as u like, just add &

Let me know it it worked


RAZ

Function within a cell that has a number
 
if its giving you 5000, it means its working,
i am sure u dont have any number on A1 and A2, so adding them is 0,
which is why its giving you 500 with a zero in the side, shows up as 5000.


"Té" wrote:

I just tried it on 03 and it didnt work either it returned 5000 back

"Raz" wrote:

hmm, it works fiine in mine, are you using excel 2007?

try adding brackets and quatation signs, for example
="500"&(A1+A2)


"Té" wrote:

When I tried that it said it was a circular reference and it came back 0

"Raz" wrote:

try this:
=500&A1+A2

If you want space between two then use this

=500&" "&A1+A2

You can add as many equations or text as u like, just add &

Let me know it it worked


Té

Function within a cell that has a number
 
I have 500 already in place. What I want to do is keep the number 500, then
on top of that create a formula that adds a1 and b1 together. So I want to
look like
500
600

I have 500 in a1 and 100 in b1. Does that make sense?

"Raz" wrote:

if its giving you 5000, it means its working,
i am sure u dont have any number on A1 and A2, so adding them is 0,
which is why its giving you 500 with a zero in the side, shows up as 5000.


"Té" wrote:

I just tried it on 03 and it didnt work either it returned 5000 back

"Raz" wrote:

hmm, it works fiine in mine, are you using excel 2007?

try adding brackets and quatation signs, for example
="500"&(A1+A2)


"Té" wrote:

When I tried that it said it was a circular reference and it came back 0

"Raz" wrote:

try this:
=500&A1+A2

If you want space between two then use this

=500&" "&A1+A2

You can add as many equations or text as u like, just add &

Let me know it it worked


Ron Rosenfeld

Function within a cell that has a number
 
On Fri, 26 Sep 2008 10:47:01 -0700, Té wrote:

I have a number in a1 which is 500. Is there a way I can leave the 500 in
place, along with add a formula to that cell as well. I want to add a1+b1,
but I want to keep the 500 there. I know alt + enter goes down to the next
line, but when I insert the formula it doesnt work.


It's not clear to me why you would want to do this; perhaps an easier to
implement solution would become apparent if you were to explain that.

If you were to change the "500", you would also need to re-enter the formula.
This might cause difficulties in the future.

The cleanest method would be to use a separate cell to hold your formula.

In that cell might be a formula similar to:

="500 " & a1+b1

--ron

Tom Hutchins

Function within a cell that has a number
 
You are getting a circular reference because your formula in A1 is using its
own value to generate a result, which is returned to A1. This is a strange
request, but here is one way to accomplish it (without a circular reference):

The cell (A1) where you want to do this must be formatted to wrap text.

In a VBA module in your workbook, enter this user-defined function:

Function AddToCell(Value1 As Double, Value2 As Double) As String
AddToCell$ = Value1 & vbCrLf & (Value1 + Value2)
End Function

Then, call AddToCell in A1 ilke this:
=AddToCell(500,B1)
where B1 contains 100.

If you are new to user-defined functions (macros), this link to Jon
Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Té" wrote:

I have 500 already in place. What I want to do is keep the number 500, then
on top of that create a formula that adds a1 and b1 together. So I want to
look like
500
600

I have 500 in a1 and 100 in b1. Does that make sense?

"Raz" wrote:

if its giving you 5000, it means its working,
i am sure u dont have any number on A1 and A2, so adding them is 0,
which is why its giving you 500 with a zero in the side, shows up as 5000.


"Té" wrote:

I just tried it on 03 and it didnt work either it returned 5000 back

"Raz" wrote:

hmm, it works fiine in mine, are you using excel 2007?

try adding brackets and quatation signs, for example
="500"&(A1+A2)


"Té" wrote:

When I tried that it said it was a circular reference and it came back 0

"Raz" wrote:

try this:
=500&A1+A2

If you want space between two then use this

=500&" "&A1+A2

You can add as many equations or text as u like, just add &

Let me know it it worked


Gord Dibben

Function within a cell that has a number
 
="500" & CHAR(10) & A1+B1 entered in C1

Set C1 to wrap text.


Gord Dibben MS Excel MVP


On Fri, 26 Sep 2008 10:47:01 -0700, Té wrote:

I have a number in a1 which is 500. Is there a way I can leave the 500 in
place, along with add a formula to that cell as well. I want to add a1+b1,
but I want to keep the 500 there. I know alt + enter goes down to the next
line, but when I insert the formula it doesnt work.




All times are GMT +1. The time now is 08:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com