+ Reply to Thread
Results 1 to 7 of 7

Resolving link into data in a macro

  1. #1
    Registered User
    Join Date
    04-26-2005
    Posts
    9

    Resolving link into data in a macro

    is there a macro command that resolves a field link into the actual field data? I have fields that say stuff like "=H15" but I need them to "hit enter" and display the actual data that is in H15. Any help or suggestions on where to look would be appreciated.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Can you list some of the code that you are having a problem with? Much easier to rewrite existing code...

    More info, please
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Registered User
    Join Date
    04-26-2005
    Posts
    9
    Here is the code that pastes the link into the field

    Sheets("S").Select
    Range("F2").Select
    ActiveCell.FormulaR1C1 = "="
    Range("G2").Select
    ActiveCell.FormulaR1C1 = "CR!B"
    Range("H2").Select
    ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-2],RC[-1],RC[-4])"
    Range("H2").Select
    Selection.Copy
    Sheets("Graphs").Select
    Range("F3").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False


    This leaves cell F3 of the "Graphs" sheet with something that might look like "=CR!B255"

    I need the F3 cell to display what the value of the CR!B255 cell is... not the link "=CR!B255"

  4. #4
    Registered User
    Join Date
    10-25-2004
    Location
    Mumbai.India
    Posts
    4

    Past Value in cell

    Hi ,
    I hope this will solve your problem. If you need any more do ask.
    Copy this code and paste in your worksheet code.


    Regards
    S.Suresh


    Private Sub Worksheet_Change(ByVal Target As Range)

    Application.EnableEvents = False

    x = Target
    Target = x
    Target.Value = Target.Value

    Application.EnableEvents = True

    End Sub

  5. #5
    Registered User
    Join Date
    04-26-2005
    Posts
    9
    I don't think this is doing what I meant to ask. I still need the field to be linked to the cell that the source data is in.
    Last edited by wpattison; 04-29-2005 at 11:21 AM.

  6. #6
    Registered User
    Join Date
    04-26-2005
    Posts
    9
    When I run the macro with your code in it changes my F3 cell to the data of the linked cell, but the link is lost. I need the link to still be there.

  7. #7
    Registered User
    Join Date
    04-26-2005
    Posts
    9
    I feel like there should be some command such as
    ActiveCell.Refresh or ActiveCell.Update or something that will resolve the formula to the data, but still contain the formula. I can't get any command such as this to work.

    Any other help or ideas on places I could look would be appreciated

+ 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