+ Reply to Thread
Results 1 to 2 of 2

FormulaLocal in Conditional Formatting

Hybrid View

  1. #1
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    FormulaLocal in Conditional Formatting

    Hi there!

    I wrote a piece of code for somebody that has as formula separator the coma character (,) so on his computer you wold write as a formula:
    =AND($B$3>$B$4,$C$3>$C$4)
    but on my computer the system separator is the semicolon ( ; ) so the same formula to work it will have to written like this"
    =AND($B$3>$B$4;$C$3>$C$4)
    Now my problem is that I'm trying to apply conditional formatting using VBA and I have to replace that separator with the system's separator because FormatConditions.Add does not support FormulaLocal. Is there a way I can find the system separator?

    ...
    myformula = "=AND($B$3>$B$4,$C$3>$C$4)"
    rng.FormatConditions.Add xlExpression, Formula1:=myformula 
    rng.FormatConditions(1).Font.Bold = True
    rng.FormatConditions(1).Font.Italic = True
    ...
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  2. #2
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: FormulaLocal in Conditional Formatting

    Got it! It was the ListSeparator I was after! Thanks anyway!
    For whom it might help:
    Application.International(xlListSeparator)

+ 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. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  2. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  3. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  4. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  5. Problem Using FormulaLocal in VBA
    By QcSylvanio in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-12-2013, 09:38 AM
  6. Delete Conditional Formatting conditions but keep cell formatting - Excel 2010
    By tetreama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2012, 08:28 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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