+ Reply to Thread
Results 1 to 7 of 7

Help with macros & conditional formatting

  1. #1
    Registered User
    Join Date
    11-10-2021
    Location
    California
    MS-Off Ver
    2016
    Posts
    9

    Help with macros & conditional formatting

    Hello Hello

    I have a spreadsheet that I want to update with either a conditional format or a macro that will automatically populate the date when a specific column is updated from "N" to "Y"

    In other words, if G4 has a "Y" in it, the H4 auto-populates the day the "Y" was entered. I have basic knowledge of how to use conditional formatting and am teaching myself more as well as how to use macros but could definitely use an assist.

    Thank you in advance!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help with macros & conditional formatting

    Conditional Formatting cannot put a value or date in a cell.

    Try this event macro...

    To install the code:
    • Right-click on the sheet tab.
    • Select View Code from the pop-up context menu.
    • Paste the code from below in the worksheet's code module.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    11-10-2021
    Location
    California
    MS-Off Ver
    2016
    Posts
    9

    Re: Help with macros & conditional formatting

    Good Morning!

    Thanks so much for help!
    As I stated earlier, I'm very new to this and have very basic knowledge of Excel. Could you please explain to me what I might be doing wrong with the code you gave me?
    I copy and pasted the code exactly as you have it. I ran the code, saved the document, closed and reopened it, and nothing happened. Any insight?

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help with macros & conditional formatting

    Nothing is suppose to happen when you open the file. The code will automatically "run" when you type a Y in column G. It then puts the date in column H.

    Did you put the code in the worksheet's code module?

  5. #5
    Registered User
    Join Date
    11-10-2021
    Location
    California
    MS-Off Ver
    2016
    Posts
    9

    Re: Help with macros & conditional formatting

    okay - i realized the issue. I was looking at the wrong Columns. It should be if Column F has a "Y" in it then Column G should populate the date. A thread I had been looking at previously talked about Columns G & H and I confused myself.

    I tried to edit the code myself but since I'm not entirely sure what I'm reading, it didn't work. Could you tell me what I need to change?

    Thank you!!! :)

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help with macros & conditional formatting

    To make it F and G, just change the 7 to a 6. That's it.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-10-2021
    Location
    California
    MS-Off Ver
    2016
    Posts
    9

    Re: Help with macros & conditional formatting

    Perfect! Thank you so much!

+ 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] Macros to SUM by conditional formatting
    By oeyandyprawira in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2015, 09:16 PM
  2. [SOLVED] Conditional formatting or macros or vba?
    By lcartwright in forum Excel General
    Replies: 2
    Last Post: 08-07-2014, 06:28 PM
  3. [SOLVED] Conditional formatting + macros
    By helpplease344 in forum Excel General
    Replies: 4
    Last Post: 05-16-2014, 03:42 PM
  4. [SOLVED] Macros and conditional formatting
    By skalus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-25-2013, 08:38 AM
  5. Conditional formatting and macros.
    By johnfar in forum Excel General
    Replies: 0
    Last Post: 12-15-2011, 09:41 AM
  6. Conditional Formatting Macros
    By njadam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2011, 02:58 AM
  7. Conditional Formatting And Macros
    By Dominic_Hodgson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-04-2007, 05:33 AM

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