+ Reply to Thread
Results 1 to 4 of 4

If function "logic test" to read the value in a formula.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    If function "logic test" to read the value in a formula.

    Hi Guys
    Good afternoon
    I am trying to create a formula which can read the value of the cell it is referring to not the actual formula.
    =IF(P770=ControlSheet!T204,ControlSheet!U204,)
    P770 is Post Office Ltd
    ControSheet T204 translates to Post Office Ltd.
    ControlSheet U204 gives Stationary & Postage In this case it works fine.

    But there are occasion in my worksheet where the value in the P column is ='Petty cash'!C23 (or another cell in that sheet but in column C)which in this instance is also Post Office Ltd but my return is 0.

    I am sure that the answer is dead simple but despite my attempts with my limited experience I cannot find a way round.

    All the Best Mark

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: If function "logic test" to read the value in a formula.

    In some cases, there are space(s) before or after the text.
    So try this:
    IF(TRIM(P770)=TRIM(ControlSheet!T204),....)
    to avoid rid of space.
    If it does not work, try to upload small example.
    Quang PT

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: If function "logic test" to read the value in a formula.

    Mark

    A formula will not read the formula from a cell it references, it will read the value.

    If you aren't getting the expected result(s) it could be because there's no match.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    03-25-2011
    Location
    London, England
    MS-Off Ver
    office 2021
    Posts
    318

    Re: If function "logic test" to read the value in a formula.

    Thanks for all this i will check it out. At least now I know where I am going.

+ 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