Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8

    Answered: Execl Function to read a formula

    in B32 I have a formula ='C Shift'!A32

    is there a formula that i can read the SheetName of B32 even if excel converted it to text

    eg


    b32 has ='C Shift'!A32 Z32 has the formula value 'C Shift'!A32 in it


    hope this make cents
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  2. Best Answer
    Posted by healdem

    "To be honest I dobt know, but as like all MS Office apps virtually every property is exposed by the various objects and I know you can set a formula using code. So it should be possible to read the formula.
    Providing you know tge index of the sheet you need to refer to throught the worksheets object you should be able to get the sheetname.
    https://exceljet.net/formula/get-sheet-name-only"


  3. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    To be honest I dobt know, but as like all MS Office apps virtually every property is exposed by the various objects and I know you can set a formula using code. So it should be possible to read the formula.
    Providing you know tge index of the sheet you need to refer to throught the worksheets object you should be able to get the sheetname.
    https://exceljet.net/formula/get-sheet-name-only
    I'd rather be riding on the Tiger 800 or the Norton

  4. #3
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    I Did in Code

    Public Function ShowMeFormula(ThisCell As Range) As String

    ShowMeFormula = ThisCell.Formula

    End Function


    But was thinking has Execl got one already
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  5. #4
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    Look up INDIRECT in the help file.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •