Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Neil Goldwasser
 
Posts: n/a
Default Highest & lowest place value / decimal places of cell value

Hi! Does anybody know of a function/series of functions that could determine
the upper & lower place value of a cell value?

E.g. the highest place value used in 123.4 is the hundreds column, and the
lowest is the tenths column. Whereas the highest in 12.34 is the tens column
and the lowest is the hundreths column.

The output would probably be best if it was numerical relative to the
decimal point, as is used in the ROUND functions (number of decimal places
used), e.g.

units column = 0

tenths column = 1 (1 d.p.)
hundredths column = 2 (2.d.p)
etc...
and going the other way (with the result being a negative number, so
denoting a place value to the LEFT of the decimal point)

tens column = -1
hundreds column = -2
etc...

I'd be really grateful if anybody could solve this puzzle for me.
Many thanks in advance, Neil
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gizmo63
 
Posts: n/a
Default Highest & lowest place value / decimal places of cell value

Hey, that was an interesting challenge, especially the lower but here you go:
To evaluate A1:

Upper value:
=LEN(TEXT(INT(ABS(A1)),0))-1

Lower value:
=LEN(RIGHT(TEXT(ABS(A1)-INT(ABS(A1)),"General"),LEN(TEXT(ABS(A1)-INT(ABS(A1)),"General"))-IF(ISERROR(FIND(".",TEXT(ABS(A1)-INT(ABS(A1)),"General"),1)),1,FIND(".",TEXT(ABS(A1 )-INT(ABS(A1)),"General"),1))))

HTH

Giz

"Neil Goldwasser" wrote:

Hi! Does anybody know of a function/series of functions that could determine
the upper & lower place value of a cell value?

E.g. the highest place value used in 123.4 is the hundreds column, and the
lowest is the tenths column. Whereas the highest in 12.34 is the tens column
and the lowest is the hundreths column.

The output would probably be best if it was numerical relative to the
decimal point, as is used in the ROUND functions (number of decimal places
used), e.g.

units column = 0

tenths column = 1 (1 d.p.)
hundredths column = 2 (2.d.p)
etc...
and going the other way (with the result being a negative number, so
denoting a place value to the LEFT of the decimal point)

tens column = -1
hundreds column = -2
etc...

I'd be really grateful if anybody could solve this puzzle for me.
Many thanks in advance, Neil

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Neil Goldwasser
 
Posts: n/a
Default Highest & lowest place value / decimal places of cell value

That's great! Thank you very much, I certainly wouldn't have got to that one!
Many thanks for your help, Neil


"Gizmo63" wrote:

Hey, that was an interesting challenge, especially the lower but here you go:
To evaluate A1:

Upper value:
=LEN(TEXT(INT(ABS(A1)),0))-1

Lower value:
=LEN(RIGHT(TEXT(ABS(A1)-INT(ABS(A1)),"General"),LEN(TEXT(ABS(A1)-INT(ABS(A1)),"General"))-IF(ISERROR(FIND(".",TEXT(ABS(A1)-INT(ABS(A1)),"General"),1)),1,FIND(".",TEXT(ABS(A1 )-INT(ABS(A1)),"General"),1))))

HTH

Giz

"Neil Goldwasser" wrote:

Hi! Does anybody know of a function/series of functions that could determine
the upper & lower place value of a cell value?

E.g. the highest place value used in 123.4 is the hundreds column, and the
lowest is the tenths column. Whereas the highest in 12.34 is the tens column
and the lowest is the hundreths column.

The output would probably be best if it was numerical relative to the
decimal point, as is used in the ROUND functions (number of decimal places
used), e.g.

units column = 0

tenths column = 1 (1 d.p.)
hundredths column = 2 (2.d.p)
etc...
and going the other way (with the result being a negative number, so
denoting a place value to the LEFT of the decimal point)

tens column = -1
hundreds column = -2
etc...

I'd be really grateful if anybody could solve this puzzle for me.
Many thanks in advance, Neil

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra 1 showing up in 15th decimal place nsc Excel Discussion (Misc queries) 5 December 16th 05 12:57 PM
Formula for: Format Decimal places? nastech Excel Discussion (Misc queries) 16 November 4th 05 02:25 PM
tools|options|Edit tab|fixed decimal places Jonathan Cooper Excel Discussion (Misc queries) 1 September 29th 05 02:36 PM
goal seek wont calculate an accurate value past 3 decimal places Joe Browning Excel Discussion (Misc queries) 1 April 13th 05 07:29 AM
How to find highest, lowest and last cell in row? Sam Excel Discussion (Misc queries) 3 December 3rd 04 11:59 AM


All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"