Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default IF formula with correct formatting in result

This may be simple for someone
Cell A1 = $3,500
Cell A2 = $2,000
example formula
=IF(A1="","",IF(A1=A2,"ok - matched",IF(A1-A20,A1-A2&" overstated","A2-A1&"
understated")))
This if statement provides the answer -- 1500 overstated
But I want the answer to be -- $1,500 overstated
Is there a way I can build the formatting of the dollar amount into the IF
statement, or is there a way I can enter a custom format that allows for the
varying text depending on the sum result.

thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default IF formula with correct formatting in result

You could use the text function
TEXT(A1-A2,"$#,##0)&" overstated"


"tmp4" wrote:

This may be simple for someone
Cell A1 = $3,500
Cell A2 = $2,000
example formula
=IF(A1="","",IF(A1=A2,"ok - matched",IF(A1-A20,A1-A2&" overstated","A2-A1&"
understated")))
This if statement provides the answer -- 1500 overstated
But I want the answer to be -- $1,500 overstated
Is there a way I can build the formatting of the dollar amount into the IF
statement, or is there a way I can enter a custom format that allows for the
varying text depending on the sum result.

thanks for your help

  #3   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default IF formula with correct formatting in result

Left out a quote
TEXT(A1-A2,"$#,##0")&" overstated"


"JMB" wrote:

You could use the text function
TEXT(A1-A2,"$#,##0)&" overstated"


"tmp4" wrote:

This may be simple for someone
Cell A1 = $3,500
Cell A2 = $2,000
example formula
=IF(A1="","",IF(A1=A2,"ok - matched",IF(A1-A20,A1-A2&" overstated","A2-A1&"
understated")))
This if statement provides the answer -- 1500 overstated
But I want the answer to be -- $1,500 overstated
Is there a way I can build the formatting of the dollar amount into the IF
statement, or is there a way I can enter a custom format that allows for the
varying text depending on the sum result.

thanks for your help

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default IF formula with correct formatting in result

Thanks, I'l go and try that now

"JMB" wrote:

Left out a quote
TEXT(A1-A2,"$#,##0")&" overstated"


"JMB" wrote:

You could use the text function
TEXT(A1-A2,"$#,##0)&" overstated"


"tmp4" wrote:

This may be simple for someone
Cell A1 = $3,500
Cell A2 = $2,000
example formula
=IF(A1="","",IF(A1=A2,"ok - matched",IF(A1-A20,A1-A2&" overstated","A2-A1&"
understated")))
This if statement provides the answer -- 1500 overstated
But I want the answer to be -- $1,500 overstated
Is there a way I can build the formatting of the dollar amount into the IF
statement, or is there a way I can enter a custom format that allows for the
varying text depending on the sum result.

thanks for your help

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
not sure if I'm using the correct formula for the result I want? Brad[_5_] New Users to Excel 1 June 23rd 09 01:17 PM
not sure if I'm using the correct formula for the result I want Brad[_5_] New Users to Excel 3 June 18th 09 09:14 PM
not sure if I'm using the correct formula for the result I want Brad[_5_] New Users to Excel 2 June 18th 09 08:24 PM
Formula is correct, but result will not show bryanchughes Excel Worksheet Functions 5 September 22nd 08 12:02 AM
Formula Result Correct but value in the cell is wrong jac Excel Worksheet Functions 2 December 17th 04 08:05 PM


All times are GMT +1. The time now is 06:50 PM.

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"