Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Formula text and decimal place

Hi,

Trevor Shuttleworth kindly wrote this formula for me:


A1=300
A2=g


300 This weight 300 is in g
300.1 This weight 300.1 is in g
300.12 This weight 300.12 is in g
300.123 This weight 300.123 is in g
300.1234 This weight 300.1234 is in g


Using:


="This weight
"&INT(A1)&IF(ISERROR(FIND(".",A1)),"","."&MID(A1,F IND(".",A1)+1,LEN(A1)-FIN**D(".",A1)))&"

is in "&A2


But, I have 2 areas I would like to refine it.


1 If I use a negative number in A1, I get 1 added to the number like
this: -0.5 becomes -1.5 and I dont want that


2 I need this to work when using zeroes as trailing numbers, not
always fractional decimal places: 300.00 instead of 300.12 currently it

sees 300.00 as just 300.


Can anyone help with this?


Thanks in advance,


Aaron.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Formula text and decimal place

I am not clear as to why Trevor's formula is so complex, as this seems to do
it

="This weight "&A1&" is in "&A2

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
ups.com...
Hi,

Trevor Shuttleworth kindly wrote this formula for me:


A1=300
A2=g


300 This weight 300 is in g
300.1 This weight 300.1 is in g
300.12 This weight 300.12 is in g
300.123 This weight 300.123 is in g
300.1234 This weight 300.1234 is in g


Using:


="This weight
"&INT(A1)&IF(ISERROR(FIND(".",A1)),"","."&MID(A1,F IND(".",A1)+1,LEN(A1)-FIN*
*D(".",A1)))&"

is in "&A2


But, I have 2 areas I would like to refine it.


1 If I use a negative number in A1, I get 1 added to the number like
this: -0.5 becomes -1.5 and I dont want that


2 I need this to work when using zeroes as trailing numbers, not
always fractional decimal places: 300.00 instead of 300.12 currently it

sees 300.00 as just 300.


Can anyone help with this?


Thanks in advance,


Aaron.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Formula text and decimal place

Hi Bob,

Your suggestion does not cater for preservation of the Decimal Placings
of the original number in the final statement. Can you elaborate any
more please?

Cheers,

Aaron.
Bob Phillips wrote:
I am not clear as to why Trevor's formula is so complex, as this seems to do
it

="This weight "&A1&" is in "&A2

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
ups.com...
Hi,

Trevor Shuttleworth kindly wrote this formula for me:


A1=300
A2=g


300 This weight 300 is in g
300.1 This weight 300.1 is in g
300.12 This weight 300.12 is in g
300.123 This weight 300.123 is in g
300.1234 This weight 300.1234 is in g


Using:


="This weight
"&INT(A1)&IF(ISERROR(FIND(".",A1)),"","."&MID(A1,F IND(".",A1)+1,LEN(A1)-FIN*
*D(".",A1)))&"

is in "&A2


But, I have 2 areas I would like to refine it.


1 If I use a negative number in A1, I get 1 added to the number like
this: -0.5 becomes -1.5 and I dont want that


2 I need this to work when using zeroes as trailing numbers, not
always fractional decimal places: 300.00 instead of 300.12 currently it

sees 300.00 as just 300.


Can anyone help with this?


Thanks in advance,


Aaron.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Formula text and decimal place

it preserves it for me.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
oups.com...
Hi Bob,

Your suggestion does not cater for preservation of the Decimal Placings
of the original number in the final statement. Can you elaborate any
more please?

Cheers,

Aaron.
Bob Phillips wrote:
I am not clear as to why Trevor's formula is so complex, as this seems to

do
it

="This weight "&A1&" is in "&A2

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
ups.com...
Hi,

Trevor Shuttleworth kindly wrote this formula for me:


A1=300
A2=g


300 This weight 300 is in g
300.1 This weight 300.1 is in g
300.12 This weight 300.12 is in g
300.123 This weight 300.123 is in g
300.1234 This weight 300.1234 is in g


Using:


="This weight

"&INT(A1)&IF(ISERROR(FIND(".",A1)),"","."&MID(A1,F IND(".",A1)+1,LEN(A1)-FIN*
*D(".",A1)))&"

is in "&A2


But, I have 2 areas I would like to refine it.


1 If I use a negative number in A1, I get 1 added to the number like
this: -0.5 becomes -1.5 and I dont want that


2 I need this to work when using zeroes as trailing numbers, not
always fractional decimal places: 300.00 instead of 300.12 currently it

sees 300.00 as just 300.


Can anyone help with this?


Thanks in advance,


Aaron.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Formula text and decimal place

Hi Bob,

Well it doesent for me. What should I check to get the same results you
do?

I dont understand how a simple tying of cells together with &A1& etc
can preserve the decimal places in A1. This is why Trevor wrote the
formula he did.

Cheers,

Aaron.

Bob Phillips wrote:
it preserves it for me.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
oups.com...
Hi Bob,

Your suggestion does not cater for preservation of the Decimal Placings
of the original number in the final statement. Can you elaborate any
more please?

Cheers,

Aaron.
Bob Phillips wrote:
I am not clear as to why Trevor's formula is so complex, as this seems to

do
it

="This weight "&A1&" is in "&A2

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
ups.com...
Hi,

Trevor Shuttleworth kindly wrote this formula for me:


A1=300
A2=g


300 This weight 300 is in g
300.1 This weight 300.1 is in g
300.12 This weight 300.12 is in g
300.123 This weight 300.123 is in g
300.1234 This weight 300.1234 is in g


Using:


="This weight

"&INT(A1)&IF(ISERROR(FIND(".",A1)),"","."&MID(A1,F IND(".",A1)+1,LEN(A1)-FIN*
*D(".",A1)))&"

is in "&A2


But, I have 2 areas I would like to refine it.


1 If I use a negative number in A1, I get 1 added to the number like
this: -0.5 becomes -1.5 and I dont want that


2 I need this to work when using zeroes as trailing numbers, not
always fractional decimal places: 300.00 instead of 300.12 currently it

sees 300.00 as just 300.


Can anyone help with this?


Thanks in advance,


Aaron.


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
how to place a decimal after 3rd digit Alison Excel Discussion (Misc queries) 6 October 27th 08 11:56 PM
Subtracting two 2-decimal place numbers gives result 13-decimal places? [email protected] Excel Worksheet Functions 5 March 12th 07 10:38 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM
changing to two place decimal Debbie Excel Worksheet Functions 1 February 5th 06 04:53 AM
Fixed decimal place CheriFireFox Setting up and Configuration of Excel 2 May 13th 05 04:10 PM


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

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

About Us

"It's about Microsoft Excel"