Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default comparing amounts

I am comparing 2 spreadsheets to find identical items. I create a reference
column for each sheet. Each reference number contains the amount of the
item. The sources for the data in each sheet comes from different sources.

One sheet, the amount is a text field and displays as 1,500.00 in the
formula bar and in the cell.

The other sheet is a number field and displays as 1500 in the formula bar
and as 1,500.00 in the cell.

I need to convert the amounts in one sheet so they match the amounts in the
other sheet when shown in the formula bar. Ideally, I would like to convert
the amounts in the second sheet so they display commas and decimal points in
the formula bar.

Any suggestions would be greatly appreciated. Thanks for the help...

--
JT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default comparing amounts

JT
The only way I know how to do what you want is to change the value to
text. This macro will do that for all of Column A starting with row 2.
Note that the subsequent values are text, not numbers. HTH Otto
Sub Macro1()
Dim TheRng As Range
Dim i As Range
Dim TheValue As Double
Set TheRng = Range("A2", Range("A" & Rows.Count).End(xlUp))
For Each i In TheRng
TheValue = i.Value
i.ClearContents
i.NumberFormat = "@"
i.Value = Format(TheValue, "#,##0.00")
Next i
End Sub
"JT" wrote in message
...
I am comparing 2 spreadsheets to find identical items. I create a
reference
column for each sheet. Each reference number contains the amount of the
item. The sources for the data in each sheet comes from different
sources.

One sheet, the amount is a text field and displays as 1,500.00 in the
formula bar and in the cell.

The other sheet is a number field and displays as 1500 in the formula bar
and as 1,500.00 in the cell.

I need to convert the amounts in one sheet so they match the amounts in
the
other sheet when shown in the formula bar. Ideally, I would like to
convert
the amounts in the second sheet so they display commas and decimal points
in
the formula bar.

Any suggestions would be greatly appreciated. Thanks for the help...

--
JT



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
Comparing Row by Row - A-D dollar amounts to E dollar amount Mel Excel Worksheet Functions 9 November 20th 08 09:50 PM
Rolling Monthly Amounts to Annual Monthly Amounts RV Excel Discussion (Misc queries) 0 August 29th 06 04:56 PM
11 $ amounts, 6 of the amounts must equal $3854.12, which 6? Marianne Excel Discussion (Misc queries) 2 August 26th 06 12:39 AM
How do I add 5 to amounts <25, 10 to amounts 25<100, etc? Duke Excel Worksheet Functions 3 March 7th 06 03:21 AM
same amounts from two different database Fernando Excel Discussion (Misc queries) 1 March 29th 05 11:23 PM


All times are GMT +1. The time now is 01:05 AM.

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"