ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding numbers within an already created value (https://www.excelbanter.com/excel-discussion-misc-queries/105336-adding-numbers-within-already-created-value.html)

BLK

Adding numbers within an already created value
 
There are two ways for me to solve what I'm trying to do:

1) Can excel add numbers within a value? For example if 17 is in a cell, can
I tell excel to add 1+7 and return 8? Or if the value is 325 than excel would
return a '1' (as 3+2+5 = 10 and 1+0=1)

2) Or is there a way for excel to check whether a specific integer is
contained within a value? For example, if the number in the cell is 17, is
there a way for excel to check whether a '7' is contained within the cell and
return a value or word I specify?

Hope that's clear. Thanks.

Sandy Mann

Adding numbers within an already created value
 
BLK,

Try:

1) =SUM(--MID(H6,ROW(INDIRECT("1:"&LEN(H6))),1))
array entered with Ctrl + Shift + Enter not just Enter
or
=SUMPRODUCT(--MID(H6,ROW(INDIRECT("1:"&LEN(H6))),1))
normally entered.

2)=IF(ISERROR(FIND(7,H6)),"","My Word")

--
HTH

Sandy
In Perth, the ancient capital of Scotland


with @tiscali.co.uk


"BLK" wrote in message
...
There are two ways for me to solve what I'm trying to do:

1) Can excel add numbers within a value? For example if 17 is in a cell,
can
I tell excel to add 1+7 and return 8? Or if the value is 325 than excel
would
return a '1' (as 3+2+5 = 10 and 1+0=1)

2) Or is there a way for excel to check whether a specific integer is
contained within a value? For example, if the number in the cell is 17,
is
there a way for excel to check whether a '7' is contained within the cell
and
return a value or word I specify?

Hope that's clear. Thanks.




Barb Reinhardt

Adding numbers within an already created value
 
This should get you part of the way.

Enter the following
B1: 1
C1: =B1+1
Copy over to J1

B2: =10^(B1-1)
Copy over to J2
C1: Enter the value you want in this case 1234567

Enter the following in C3:
C3: =MOD($A3/B$2,10*B$2)

Copy over to J3

Does that help??

"BLK" wrote:

There are two ways for me to solve what I'm trying to do:

1) Can excel add numbers within a value? For example if 17 is in a cell, can
I tell excel to add 1+7 and return 8? Or if the value is 325 than excel would
return a '1' (as 3+2+5 = 10 and 1+0=1)

2) Or is there a way for excel to check whether a specific integer is
contained within a value? For example, if the number in the cell is 17, is
there a way for excel to check whether a '7' is contained within the cell and
return a value or word I specify?

Hope that's clear. Thanks.



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

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