+ Reply to Thread
Results 1 to 11 of 11

Formula to read cell references as number value

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Formula to read cell references as number value

    Hello,

    I'm having trouble with the formula below, it only works when 'Start!D27' has a value in it rather than referring to a different cell, however, I need 'Start!D27' to refer to a different cell.
    So basically we have a formula that refers to a cell which refers to a different cell in a different sheet which again refers to a different cell (in that same sheet )
    Here is the work book with the formula issue. I highlighted all the parts that need attention CELL REFERENCES.xlsx
    Any help on this issue would be greatly appreciated.

    Please Login or Register  to view this content.
    Last edited by kosherboy; 04-01-2014 at 12:56 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Formula to read cell references as number value

    Shalom

    I think that you need to use the indirect function.

    try this:-

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Formula to read cell references as number value

    Thanks but the cell is returning "#REF!"

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula to read cell references as number value

    I'm having trouble understanding what you want to do here.
    If there's a number in H2, then what do you want to happen?
    Your formula
    =IF(ISNUMBER(H2), Start!L27&(H2),Start!L27)
    will concatenate the number in StartL27 with H2 giving you
    460205480125 (text)
    Did you want them added?
    What is your expected result if there's something in H2? If there isn't something in H2?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Formula to read cell references as number value

    Hi and thanks for your reply.
    Working in Sheet2 the formula will be found in cell E4. Cell H12 (which is part of the formula) is based off a cell in Sheet1. Let's call that cell L11. Cell L11 is also based off a different cell in sheet1 as well, we'll call that cell A1 (I know it sounds strange this whole procedure but it's complicated to explain why i do this). Now, if Cell A1 is blank that would mean Cell L11 is blank which in return would mean cell H12 in sheet2 is blank as well, the formula then should return only 6 digits. And visa versa if cell A1 is not blank.........then the formula should return 12 digits. However the formula is not working properly.
    Interesting to note that when I made cell L11 in sheet1 the main original cell with the value the formula in sheet2 worked perfect. But when I based Cell L11 off Cell A1 the formula got messed up. This really beats me. It seems to me that the formula cannot read cells that are based off a cell which is based off another cell.
    Last edited by kosherboy; 04-02-2014 at 10:07 AM.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula to read cell references as number value

    the value in h2 is not a real number because the formula =LEFT(L36,6) returns a text value
    =IF(ISNUMBER(H2+0),Start!L27&(H2),Start!L27) would sort it
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Formula to read cell references as number value

    Your answer worked! Thanks.
    Can you please explain to me why when H12 is based off a cell which is based off another cell the formula won't work properly but when H12 is based off a cell (which is not based off any other cells) the formula does work?

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula to read cell references as number value

    The formula that you use to pull L36 into L11 changes the value from a number to text (LEFT, MID and RIGHT functions always result in text strings). Excel sees them as two different creatures even though they look the same. If you'd used, in L11, =LEFT(L36,6) +0, you wouldn't have this issue.
    Hope that helps.

  9. #9
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Formula to read cell references as number value

    I hear.
    Ok, thank you.

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula to read cell references as number value

    but you would loose leading 0 if you did it at that point text 0045000 would come over as 45000

  11. #11
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: Formula to read cell references as number value

    But I can custom format that cell to have the zeros. No?

+ 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. Formula to shift cell references a certain number of columns not working
    By amartin575 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-15-2013, 01:35 PM
  2. Update Formula References Using ID Number
    By tnashbu in forum Excel General
    Replies: 7
    Last Post: 07-07-2011, 03:54 PM
  3. Read only the number value of a cell
    By PedroCollins in forum Excel General
    Replies: 12
    Last Post: 06-12-2009, 06:45 AM

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