+ Reply to Thread
Results 1 to 6 of 6

ConditionalFormat Offset Arg1 in match function.

  1. #1
    Registered User
    Join Date
    10-30-2017
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    30

    ConditionalFormat Offset Arg1 in match function.

    Hi all,

    Syntax
    expression.Match( Arg1, Arg2, Arg3 )

    In code below I have one of three expressions just to make code easy to read.
    Arg1=C42. After first loop Arg1 must be C60 etc etc.
    How to change Arg1 in match function?

    Please Login or Register  to view this content.
    Any help will be greatly appreciated.
    Thanks!

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: ConditionalFormat Offset Arg1 in match function.

    How about
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-30-2017
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    30

    Re: ConditionalFormat Offset Arg1 in match function.

    Quote Originally Posted by Fluff13 View Post
    How about
    Please Login or Register  to view this content.
    Hello Fluff13
    Thank you for answer.
    I changed to your solution and that gave me a Run-time error 5: "Invalid procedure call or argument"
    I then changed all commas to semi-colons which resulted in all cells in rng30 became formatted according to code.
    FYI, each cell in rng30 are formatted as "General" and contains first name, space and surname. Column "A" in "Sheet5" also formatted as "General".
    I tried with istext but then nothing happens. Also noticed that "isnumber" doesn't change to "IsNumber".
    Any idea of what's wrong?

    Thanks in advance

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: ConditionalFormat Offset Arg1 in match function.

    Can you supply a copy of your workbook, as that makes it a lot easier to debug.

  5. #5
    Registered User
    Join Date
    10-30-2017
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    30

    Re: ConditionalFormat Offset Arg1 in match function.

    Hello Fluff13
    Thanks alot for your input. Your solution with range = " & rng31.Address & " made me think a bit different and then I solved the problem with this solution.

    Please Login or Register  to view this content.
    It seems to work but if you can see anything not so good with code, I would appreciate if you point it out.

    Thanks

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: ConditionalFormat Offset Arg1 in match function.

    That looks fine & glad you sorted it.

+ 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. Replies: 3
    Last Post: 08-14-2017, 06:26 AM
  2. Replies: 1
    Last Post: 06-10-2015, 12:56 PM
  3. Offset function with reference cell equal to the value of match function
    By cmurda in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-08-2014, 02:09 PM
  4. [SOLVED] Match function is malfunctining if variable is used as arg1
    By SoulPrisoner in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 09-05-2013, 10:57 AM
  5. Replies: 0
    Last Post: 01-19-2013, 01:35 PM
  6. ConditionalFormat-EndsWith, and logical Test IF
    By ufo_pilot in forum Excel General
    Replies: 1
    Last Post: 04-07-2006, 10:40 AM
  7. [SOLVED] Offset function with nested match function not finding host ss.
    By MKunert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2006, 06:50 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