Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 3 of 3

Thread: Automatically formatting a cell based other cells format.

  1. #1
    Join Date
    20th September 2005
    Location
    Sydney AUSTRALIA
    Posts
    52

    Automatically formatting a cell based other cells format.

    G'day.

    I've been trying to figure out how to make a cell's format match another cell if the format changes.

    Say I have a cell which I might occasionally format White font, Red fill. Now, I have another cell on a different worksheet that mirrors the data in this cell, but not the format. How do I get this cell to mirror the format too ?

    Cheers

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    26th July 2004
    Posts
    1,292

    Re: Automatically formatting a cell based other cells format.

    hi nodnerb

    see perhaps this code can help you

    VB:
    Private Sub Worksheet_Change(ByVal Target As Range) 
        If Not Intersect(Target, Sheets("sheet2").Range("C4")) Is Nothing Then 
            If Target.Value = Sheets("sheet1").Range("C9").Value Then 
                Target.Interior.ColorIndex = Sheets("sheet1").Range("C9").Interior.ColorIndex 
                Target.Font.ColorIndex = Sheets("sheet1").Range("C9").Font.ColorIndex 
            Else 
                Target.Interior.ColorIndex = xlNone 
                Target.Font.ColorIndex = xlAutomatic 
            End If 
        End If 
    End Sub 
    
    
    pangolin

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    20th September 2005
    Location
    Sydney AUSTRALIA
    Posts
    52

    Re: Automatically formatting a cell based other cells format.

    Thanks pangolin.

    I'll give it a shot.

    btw, do I need to edit that VBA to look at specific cells ?

    Say Sheet1!D7 is formatted, and I want to mirror the format to Sheet9!D5, how would that change that code ?

    Cheers

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Replies: 4
    Last Post: May 18th, 2009, 10:27
  2. Replies: 3
    Last Post: October 24th, 2008, 10:05
  3. Automatically Format Range Based On Specific Cell
    By boosted in forum EXCEL HELP
    Replies: 5
    Last Post: August 20th, 2008, 05:34
  4. Automatically Format Cell Based On Value
    By sjboyd in forum EXCEL HELP
    Replies: 4
    Last Post: February 27th, 2008, 08:40
  5. Automatically Add To Cells Based On Cell Value
    By mcpo00 in forum EXCEL HELP
    Replies: 2
    Last Post: July 3rd, 2007, 08:38

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
  •  
porno