PC Review


Reply
Thread Tools Rate Thread

comparing amounts

 
 
JT
Guest
Posts: n/a
 
      18th Dec 2007
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 With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      19th Dec 2007
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" <(E-Mail Removed)> wrote in message
news:2D208A18-5665-413C-8FF1-(E-Mail Removed)...
>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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing Amounts in prior years Bobbye R Microsoft Access Queries 2 31st Jan 2010 10:42 AM
Comparing Row by Row - A-D dollar amounts to E dollar amount Mel Microsoft Excel Worksheet Functions 9 20th Nov 2008 09:50 PM
Rolling Monthly Amounts to Annual Monthly Amounts =?Utf-8?B?UlY=?= Microsoft Excel Misc 0 29th Aug 2006 04:56 PM
11 $ amounts, 6 of the amounts must equal $3854.12, which 6? =?Utf-8?B?bWFyaWFubmU=?= Microsoft Excel Misc 2 26th Aug 2006 12:39 AM
Comparing Amounts DBarker Microsoft Access Forms 3 11th Feb 2004 05:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:08 AM.