[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Changing to Currency Format

Posted on 2013-11-28
5
Medium Priority
?
291 Views
Last Modified: 2013-11-28
EE Pros,

Ssaqibh wrote a Currency Update Macro for me.  I have one change to make.  The Attached Workbook works fine except the Currency formatting doesn't change when making the Currency Selection.  The formatting needs to be in Currency - Column I Cell 4 and below.

That's it!

Thank you in advance.

B.
Currency-Update-and-Displayv2.xlsm
0
Comment
Question by:Bright01
  • 2
  • 2
5 Comments
 
LVL 35

Expert Comment

by:Norie
ID: 39683472
Where do you set/select the currency?
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39683490
Sub CurrencyUpdate()
Dim cel As Range, cn As Range
Sheets("Currency").QueryTables(1).Refresh
Set cn = Sheets("Currency").Range("J3:R3").Find(Sheets("Customer-inputs").Range("F2").Value, , xlValues)
For Each cel In Sheets("Currency").Range("G4:G10000")
cel.Offset(, 2).Value = Sheets("Currency").Cells(cel.Row, cn.Column).Value
cel.Offset(, 2).NumberFormat = Cells(cel.Row, cn.Column).NumberFormat
If cel.Value <> "" Then
    Sheets(Replace(Split(cel.Value, "!")(0), "'", "")).Range(Split(cel.Value, "!")(1)).Value = cel.Offset(, 2).Value
    Sheets(Replace(Split(cel.Value, "!")(0), "'", "")).Range(Split(cel.Value, "!")(1)).NumberFormat = cel.Offset(, 2).NumberFormat
End If
Next cel
End Sub

Open in new window

0
 

Author Comment

by:Bright01
ID: 39683579
Ssaq,

I changed the macro; however, now it appears it is doing a lot of additional work (see the flickering) when firing "Update".  

Can you take a quick look?

B.
Currency-Update-and-Displayv3.xlsm
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 2000 total points
ID: 39683727
Move line 8 up to line 6
0
 

Author Closing Comment

by:Bright01
ID: 39683999
That works!  Will be authoring another question for another slight change to the program.

Thanks for hanging in there with me!

B.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question