ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   two integers in one cell (https://www.excelbanter.com/new-users-excel/192731-two-integers-one-cell.html)

KRK

two integers in one cell
 
Hello, I have Excel 2007

I am developing a spreadsheet in which it might (repeat might) be helpful to
put 2 integers into a single cell, and to access them independently from
elsewhere. I strongly suspect this is impossible (and probably daft!).

I know there are tricks I can play with formatting (hide cell boundaries
etc), or I could enter the 2 integers as a decimal number and access the
integer & decimal parts separately. eg if I want to enter 5 & 2, I enter
5.2, then use the integer function to 'split' it into 2 parts later.

Are there any facilities within Excel 2007 I don't know about that might
help ?

Thanks, and sorry if this has been a daft question

K


Gary''s Student

two integers in one cell
 
You can use the =CHOOSE() function to pick from several differenc values in a
single cell. Say we might want cell B9 to have the value 12 or 5674 or -33.

=CHOOSE(A1,12,5674,-33) depending on the value we put in A1.


Another option is to use a Data Validation pull-down.
--
Gary''s Student - gsnu2007j


"KRK" wrote:

Hello, I have Excel 2007

I am developing a spreadsheet in which it might (repeat might) be helpful to
put 2 integers into a single cell, and to access them independently from
elsewhere. I strongly suspect this is impossible (and probably daft!).

I know there are tricks I can play with formatting (hide cell boundaries
etc), or I could enter the 2 integers as a decimal number and access the
integer & decimal parts separately. eg if I want to enter 5 & 2, I enter
5.2, then use the integer function to 'split' it into 2 parts later.

Are there any facilities within Excel 2007 I don't know about that might
help ?

Thanks, and sorry if this has been a daft question

K



KRK

two integers in one cell - THANKS
 
This looks very useful, thanks,


KK



"Gary''s Student" wrote in message
...
You can use the =CHOOSE() function to pick from several differenc values
in a
single cell. Say we might want cell B9 to have the value 12 or 5674
or -33.

=CHOOSE(A1,12,5674,-33) depending on the value we put in A1.


Another option is to use a Data Validation pull-down.
--
Gary''s Student - gsnu2007j


"KRK" wrote:

Hello, I have Excel 2007

I am developing a spreadsheet in which it might (repeat might) be helpful
to
put 2 integers into a single cell, and to access them independently from
elsewhere. I strongly suspect this is impossible (and probably daft!).

I know there are tricks I can play with formatting (hide cell boundaries
etc), or I could enter the 2 integers as a decimal number and access the
integer & decimal parts separately. eg if I want to enter 5 & 2, I enter
5.2, then use the integer function to 'split' it into 2 parts later.

Are there any facilities within Excel 2007 I don't know about that might
help ?

Thanks, and sorry if this has been a daft question

K




ShaneDevenshire

two integers in one cell - THANKS
 
Hi KRK,

You can also consider VLOOKUP, HLOOKUP, INDEX or LOOKUP. For example if you
enter 1 in cell A1 and 2 in cell A2 then the formula:

=INDEX({1,4,7;2,5,8;3,6,9},A1,A2)

Would return the answer 4 the item in the 1st row, 2nd column of the array.

or

=VLOOKUP(A1,{1,4,7;2,5,8;3,6,9},A2,FALSE)

With the same data would return the same result.

or

=HLOOKUP(A1,{1,4,7;2,5,8;3,6,9},A2,FALSE)

which would return 2.

or

=LOOKUP(A1,{1;2;3;4;5},{"a";"b";"c";"d";"e"})

which would return b.


--
Cheers,
Shane Devenshire


"KRK" wrote:

This looks very useful, thanks,


KK



"Gary''s Student" wrote in message
...
You can use the =CHOOSE() function to pick from several differenc values
in a
single cell. Say we might want cell B9 to have the value 12 or 5674
or -33.

=CHOOSE(A1,12,5674,-33) depending on the value we put in A1.


Another option is to use a Data Validation pull-down.
--
Gary''s Student - gsnu2007j


"KRK" wrote:

Hello, I have Excel 2007

I am developing a spreadsheet in which it might (repeat might) be helpful
to
put 2 integers into a single cell, and to access them independently from
elsewhere. I strongly suspect this is impossible (and probably daft!).

I know there are tricks I can play with formatting (hide cell boundaries
etc), or I could enter the 2 integers as a decimal number and access the
integer & decimal parts separately. eg if I want to enter 5 & 2, I enter
5.2, then use the integer function to 'split' it into 2 parts later.

Are there any facilities within Excel 2007 I don't know about that might
help ?

Thanks, and sorry if this has been a daft question

K






All times are GMT +1. The time now is 10:53 AM.

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