Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Number format using TEXT( ) function

Hi Folks!

Using the TEXT() function, what format do I need to get:

$10
$10.50
$110.99
$1,110.99

Integers should remain integers but it should also handle decimals.

I tried $#,### which works fine on intergers but not on the decimals. Then I
tried $#,###.## which works fine on the decimals but not the integers.

Thanks

Biff


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Number format using TEXT( ) function

Maybe

=DOLLAR(A4,(MOD(A4,1)<0)*2)


"T. Valko" wrote:

Hi Folks!

Using the TEXT() function, what format do I need to get:

$10
$10.50
$110.99
$1,110.99

Integers should remain integers but it should also handle decimals.

I tried $#,### which works fine on intergers but not on the decimals. Then I
tried $#,###.## which works fine on the decimals but not the integers.

Thanks

Biff



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Number format using TEXT( ) function

Thanks, J!

The TEXT() function is part of a VLOOKUP formula. I could work that DOLLAR()
in but I'd prefer to use TEXT() and just come up with the correct format
style if there is one!

Biff

"JMB" wrote in message
...
Maybe

=DOLLAR(A4,(MOD(A4,1)<0)*2)


"T. Valko" wrote:

Hi Folks!

Using the TEXT() function, what format do I need to get:

$10
$10.50
$110.99
$1,110.99

Integers should remain integers but it should also handle decimals.

I tried $#,### which works fine on intergers but not on the decimals.
Then I
tried $#,###.## which works fine on the decimals but not the integers.

Thanks

Biff





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Number format using TEXT( ) function

Removing the unnecessary part <g. Don't know how to do it w/Text.

=DOLLAR(A4,(MOD(A4,1)0)*2)


"JMB" wrote:

Maybe

=DOLLAR(A4,(MOD(A4,1)<0)*2)


"T. Valko" wrote:

Hi Folks!

Using the TEXT() function, what format do I need to get:

$10
$10.50
$110.99
$1,110.99

Integers should remain integers but it should also handle decimals.

I tried $#,### which works fine on intergers but not on the decimals. Then I
tried $#,###.## which works fine on the decimals but not the integers.

Thanks

Biff



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Number format using TEXT( ) function

On Mon, 30 Apr 2007 22:00:04 -0400, "T. Valko" wrote:

Hi Folks!

Using the TEXT() function, what format do I need to get:

$10
$10.50
$110.99
$1,110.99

Integers should remain integers but it should also handle decimals.

I tried $#,### which works fine on intergers but not on the decimals. Then I
tried $#,###.## which works fine on the decimals but not the integers.

Thanks

Biff


=TEXT(A8,IF(A8=INT(A8),"$#,###","$#,###.00"))

However,

=DOLLAR(A8,2*(A8<INT(A8)))

gives the same result -- a dollar formatted text string with the desired
decimal, non-decimal formatting.
--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Number format using TEXT( ) function

I know what you mean - I've tried before to figure this out w/o luck. Just
doesn't seem right that there is not a way to make the decimal optional.

The only other thing I can think of would be a UDF. Perhaps someone else
knows how to turn this trick.


"T. Valko" wrote:

Thanks, J!

The TEXT() function is part of a VLOOKUP formula. I could work that DOLLAR()
in but I'd prefer to use TEXT() and just come up with the correct format
style if there is one!

Biff

"JMB" wrote in message
...
Maybe

=DOLLAR(A4,(MOD(A4,1)<0)*2)


"T. Valko" wrote:

Hi Folks!

Using the TEXT() function, what format do I need to get:

$10
$10.50
$110.99
$1,110.99

Integers should remain integers but it should also handle decimals.

I tried $#,### which works fine on intergers but not on the decimals.
Then I
tried $#,###.## which works fine on the decimals but not the integers.

Thanks

Biff






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Number format using TEXT( ) function

Thanks guys!

Looks like DOLLAR() is the best choice.

Biff

"T. Valko" wrote in message
...
Hi Folks!

Using the TEXT() function, what format do I need to get:

$10
$10.50
$110.99
$1,110.99

Integers should remain integers but it should also handle decimals.

I tried $#,### which works fine on intergers but not on the decimals. Then
I tried $#,###.## which works fine on the decimals but not the integers.

Thanks

Biff



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
Convert numbers from text format to number format merlin68 Excel Discussion (Misc queries) 7 June 20th 07 07:03 PM
Change number (in text format) to numeric format Pam Excel Discussion (Misc queries) 5 October 24th 05 07:45 PM
Hoe to change text format .126 to number format 0.126 vitality Excel Discussion (Misc queries) 3 October 6th 05 01:31 PM
convert text-format number to number in excel 2000%3f Larry Excel Discussion (Misc queries) 1 July 29th 05 08:18 PM
How do i change numbers in text format to number format? Greg New Users to Excel 1 December 14th 04 06:22 PM


All times are GMT +1. The time now is 12:47 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"