+ Reply to Thread
Results 1 to 2 of 2

VBA to create a relative formula in a conditional format (rather than an absolute formula)

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2019 H: 365
    Posts
    940

    VBA to create a relative formula in a conditional format (rather than an absolute formula)

    Morning all,

    I've managed to pull together the code below which almost does what I need but the formula creates a conditional format with an absolute reference when I need it to be relative. How can I amend the line below to achieve what I need?

    Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=MONTH(" + InvDate + ")=1"

    If you have any queries or need me to explain anything further just give me a shout.

    Thanks in advance,

    Snook


    Please Login or Register  to view this content.
    Last edited by The_Snook; 03-07-2016 at 11:53 AM.

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: VBA to create a relative formula in a conditional format (rather than an absolute form

    You may use:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

+ 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] How do I make an absolute formula (not relative)?
    By 111StepsAhead in forum Excel General
    Replies: 4
    Last Post: 04-15-2015, 12:16 PM
  2. Need to paste relative and absolute formula...I think...
    By Lydian in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-10-2013, 01:40 PM
  3. Changing Formula from absolute to Relative
    By FishGuy in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 09-17-2010, 04:45 AM
  4. Using a relative or absolute? cell in formula
    By starcraftbud in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-24-2009, 06:08 PM
  5. Mixing Absolute and Relative Reference in a Formula
    By tedd13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-01-2006, 10:10 AM
  6. [SOLVED] Formula - relative or absolute ref, keeps changing
    By Hoib in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 07-22-2005, 09:05 PM
  7. [SOLVED] Relative/Absolute Formula writing in to a cell.
    By Hari Prasadh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-03-2005, 11:06 AM

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