+ Reply to Thread
Results 1 to 6 of 6

TradingJournal Dashboard - Dynamic Decimal Points/Spaces

Hybrid View

  1. #1
    Registered User
    Join Date
    02-18-2012
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    MS Office 2021
    Posts
    48

    TradingJournal Dashboard - Dynamic Decimal Points/Spaces

    Hi all,

    As per the topic, what I'm trying to achieve is to select a particular currency from dropdown list (column E) and the columns L, M, N, O & X shoud be formated to have specific decimal places as per the currency selected. So far, I was only able to achieve this by conditional formatting but the list of currency is long so having so many conditions doesn't seem like doable approach.

    Workbook with sample data is included and this is a macro enabled workbook as I have VBA formulas so profit/loss calculations. More information is included in the workbook.
    Attached Files Attached Files
    Thanks & regards
    Dev

  2. #2
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: TradingJournal Dashboard - Dynamic Decimal Points/Spaces

    What determines the number of decimal places to use? Is there some cell that acts as a reference to know the appropriate number of decimal places for the selected currency?
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  3. #3
    Registered User
    Join Date
    02-18-2012
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    MS Office 2021
    Posts
    48

    Re: TradingJournal Dashboard - Dynamic Decimal Points/Spaces

    Quote Originally Posted by deadlyduck View Post
    What determines the number of decimal places to use? Is there some cell that acts as a reference to know the appropriate number of decimal places for the selected currency?
    No, there's no cell to act as a reference point. Basically I'm using this Journal and I'm aware of how many decimal place would a symbol have. So, was hoping that if I provide the 3 major currency symbols as sample data as they would have the similar decimal points. And if someone could help me code a solution I could expand the formula to include the other currencies.

    For example:
    1. EURUSD, GBPUSD, AUDUSD will have 5 decimal points i.e. #.#####
    2. XAUUSD, XAUEUR, USOil, UKOil will have 2 decimal places i.e. #.## or ####.##
    3. AUDJPY, EURJPY, GBPJPY, USDJPY will have 3 decimal place i.e. ##.### or ###.###

    I do have a table in the MasterData worksheet. And I can add a column there to give reference to the number of decimal places for each symbol. But not sure how to go about it i.e. just plain number 2, 3, 5 or in formate such as #.##, #,###, #.#####

  4. #4
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: TradingJournal Dashboard - Dynamic Decimal Points/Spaces

    The attached should be doing what you need.

    I added a column (column E) to the SYMBOLS section of the MasterData sheet which shows the type of number format for any particular symbol- you'll obviously need to check that these are updated.
    When you change column E on the Trades-Master sheet, the applicable formatting will be automatically applied to the relevant cells.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-18-2012
    Location
    Dubai, United Arab Emirates
    MS-Off Ver
    MS Office 2021
    Posts
    48

    Re: TradingJournal Dashboard - Dynamic Decimal Points/Spaces

    Quote Originally Posted by deadlyduck View Post
    The attached should be doing what you need.

    I added a column (column E) to the SYMBOLS section of the MasterData sheet which shows the type of number format for any particular symbol- you'll obviously need to check that these are updated.
    When you change column E on the Trades-Master sheet, the applicable formatting will be automatically applied to the relevant cells.
    Brilliant work. Thanks very much. This is exactly what I was looking.

    I do want to ask you something. Because the of the new column (column E) in the SYMBOLS table, my other formula isn't working now. So, if I were to shift column E to the end of the table i.e. column K, am I correct in changing the column number from 2 to 8 in the attached image of your formula?
    Attached Images Attached Images

  6. #6
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: TradingJournal Dashboard - Dynamic Decimal Points/Spaces

    Hi,

    Yes, change the 2 to 8 or whatever the column is in the symbols range (column D is the first column of the symbols range)
    You can also delete the line that begins Debug.print as it's just for testing purposes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] TradingJournal Dashboard - Dynamic Total values
    By ecronic in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2023, 08:52 AM
  2. [SOLVED] TradingJournal - Dynamic cell reference formula based on dropdown list selection
    By ecronic in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-04-2023, 02:24 PM
  3. [SOLVED] Only want 2 decimal spaces
    By StreekyD in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-17-2019, 02:06 PM
  4. [SOLVED] Formatting to 2 Decimal Spaces
    By sperry2565 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-27-2013, 12:27 PM
  5. Inserting spaces at certain points
    By spowell in forum Excel General
    Replies: 4
    Last Post: 01-26-2009, 09:08 PM
  6. [SOLVED] Decimal Points
    By Leanne in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. Decimal Points
    By Leanne in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1