+ Reply to Thread
Results 1 to 8 of 8

Pick up format from another cell

  1. #1
    Kathrine J Wathne
    Guest

    Pick up format from another cell

    I can make a function in a cell that picks up the content from another
    cell - example =A3

    However; this will only show the content, and not the format from A3.

    How can I make a link that picks up BOTH the content + the format. (If the
    content in A3 is blue; I want it to show in blue in the cell where =A3
    stands). Is this possible??



  2. #2
    Gord Dibben
    Guest

    Re: Pick up format from another cell

    Kathrine

    Formulas and Functions can return result only.

    They cannot change or copy formatting.

    If the content of A3 is blue due to Conditional Formatting, you can apply the
    same CF to the target cell.


    Gord Dibben MS Excel MVP

    On Thu, 15 Jun 2006 23:19:28 +0200, "Kathrine J Wathne" <[email protected]>
    wrote:

    >I can make a function in a cell that picks up the content from another
    >cell - example =A3
    >
    >However; this will only show the content, and not the format from A3.
    >
    >How can I make a link that picks up BOTH the content + the format. (If the
    >content in A3 is blue; I want it to show in blue in the cell where =A3
    >stands). Is this possible??
    >



  3. #3
    Kathrine J Wathne
    Guest

    Re: Pick up format from another cell

    OK. Thanks for helping - any other way to make this possible - not using a
    function but something else?


    "Gord Dibben" <gorddibbATshawDOTca> skrev i melding
    news:[email protected]...
    > Kathrine
    >
    > Formulas and Functions can return result only.
    >
    > They cannot change or copy formatting.
    >
    > If the content of A3 is blue due to Conditional Formatting, you can apply
    > the
    > same CF to the target cell.
    >
    >
    > Gord Dibben MS Excel MVP
    >
    > On Thu, 15 Jun 2006 23:19:28 +0200, "Kathrine J Wathne" <[email protected]>
    > wrote:
    >
    >>I can make a function in a cell that picks up the content from another
    >>cell - example =A3
    >>
    >>However; this will only show the content, and not the format from A3.
    >>
    >>How can I make a link that picks up BOTH the content + the format. (If the
    >>content in A3 is blue; I want it to show in blue in the cell where =A3
    >>stands). Is this possible??
    >>

    >




  4. #4
    Dave Peterson
    Guest

    Re: Pick up format from another cell

    Formulas can't do this kind of thing. They return values to the cell with the
    formula.



    Kathrine J Wathne wrote:
    >
    > I can make a function in a cell that picks up the content from another
    > cell - example =A3
    >
    > However; this will only show the content, and not the format from A3.
    >
    > How can I make a link that picks up BOTH the content + the format. (If the
    > content in A3 is blue; I want it to show in blue in the cell where =A3
    > stands). Is this possible??


    --

    Dave Peterson

  5. #5
    Dave Peterson
    Guest

    Re: Pick up format from another cell

    How does A3 change?

    If it changes because the user typed something, you could use an event macro
    that would copy that cell to the other cell.

    Rightclick on the worksheet tab and select View code. Paste this in the new
    code window:

    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)

    'only one cell at a time!
    If Target.Cells.Count > 1 Then Exit Sub

    If Intersect(Target, Me.Range("a3")) Is Nothing Then Exit Sub

    Application.EnableEvents = False
    Target.Copy _
    Destination:=Me.Range("a5") 'some range
    Application.EnableEvents = True

    End Sub

    Be aware that changing the format won't fire this event. You really have to
    change the cell (or hit F2|Enter to pretend to change the cell).


    Kathrine J Wathne wrote:
    >
    > OK. Thanks for helping - any other way to make this possible - not using a
    > function but something else?
    >
    > "Gord Dibben" <gorddibbATshawDOTca> skrev i melding
    > news:[email protected]...
    > > Kathrine
    > >
    > > Formulas and Functions can return result only.
    > >
    > > They cannot change or copy formatting.
    > >
    > > If the content of A3 is blue due to Conditional Formatting, you can apply
    > > the
    > > same CF to the target cell.
    > >
    > >
    > > Gord Dibben MS Excel MVP
    > >
    > > On Thu, 15 Jun 2006 23:19:28 +0200, "Kathrine J Wathne" <[email protected]>
    > > wrote:
    > >
    > >>I can make a function in a cell that picks up the content from another
    > >>cell - example =A3
    > >>
    > >>However; this will only show the content, and not the format from A3.
    > >>
    > >>How can I make a link that picks up BOTH the content + the format. (If the
    > >>content in A3 is blue; I want it to show in blue in the cell where =A3
    > >>stands). Is this possible??
    > >>

    > >


    --

    Dave Peterson

  6. #6
    Gary''s Student
    Guest

    RE: Pick up format from another cell

    Let's say that cell C10 has the formula =A3 and we desire that whenever cell
    A3 changes format, cell C10 will automatically do the same. Enter the
    following in worksheet code:

    Dim ping As Boolean
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Intersect(Target, Range("A3")) Is Nothing Then
    If ping = False Then
    Range("A3").Copy
    Range("C10").PasteSpecial Paste:=xlPasteFormats
    End If
    ping = True
    Exit Sub
    Else
    ping = False
    End If
    End Sub


    Move to cell A3 (mouse or arrow keys). Change its format. Then move away
    from A3. C10 will automatically pick up the new format.

    REMEMBER: worksheet code !
    --
    Gary's Student


    "Kathrine J Wathne" wrote:

    > I can make a function in a cell that picks up the content from another
    > cell - example =A3
    >
    > However; this will only show the content, and not the format from A3.
    >
    > How can I make a link that picks up BOTH the content + the format. (If the
    > content in A3 is blue; I want it to show in blue in the cell where =A3
    > stands). Is this possible??
    >
    >
    >


  7. #7
    Registered User
    Join Date
    01-04-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Pick up format from another cell

    Hi there,
    I had the similar issue and using your answer, i was able to make it work. thanks a lot for your post.. I am sure there are more like me getting benefited.

    Do you know if I need to need the script for more than one cell, then what will be the syntax? I understand that i need to do it ONE CELL AT A TIME.. but how to continue it for other cells..?

    thanks for your help...
    Last edited by vlady; 01-06-2013 at 09:25 PM.

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Pick up format from another cell

    Hi bhagatrohit and welcome to the forum.

    It's against the forum rules to ask something in a thread that someone else started.

    Pls start your own thread!
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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