+ Reply to Thread
Results 1 to 5 of 5

Referencing Cell gives incorrect answer but "228" gives correct answer in formula?

  1. #1
    Registered User
    Join Date
    01-07-2023
    Location
    Michigan
    MS-Off Ver
    365
    Posts
    8

    Referencing Cell gives incorrect answer but "228" gives correct answer in formula?

    Hey,
    I have a table where Column B is an ID number with no formula in it and I want to reference that ID for another formula. However, If I reference Cell B3, I get an incorrect number. However, If I reference "228" then I get the correct answer.

    Cell B3 is 228. General Format
    This formula returns the wrong answer. This returns 1 but it should be returning 18
    =SUMPRODUCT(--((Raw[DateNew2]*1)>=TODAY()-(DAY(TODAY()-1)*(Raw[StoresNew2]=B3))))

    This formula gives the correct answer
    =SUMPRODUCT(--((Raw[DateNew2]*1)>=TODAY()-(DAY(TODAY()-1)*(Raw[StoresNew2]="228"))))

    Anyone have any suggestions? I have played with all formats to be number/text/general but that didn't work.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Referencing Cell gives incorrect answer but "228" gives correct answer in formula?

    That's impossible to visualise (for me at least...).

    Please read the yellow banner (top) and upload a sample Excel file.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Referencing Cell gives incorrect answer but "228" gives correct answer in formula?

    Hi Clove1:
    Try formatting col. B in a helper col. as
    Please Login or Register  to view this content.
    . Paste back to B as values. or
    Please Login or Register  to view this content.
    (Changing the number format at the top may say text, but the value may still be stored as a number.)

    Pete
    Last edited by PeteABC123; 04-12-2023 at 12:46 PM.

  4. #4
    Registered User
    Join Date
    01-07-2023
    Location
    Michigan
    MS-Off Ver
    365
    Posts
    8

    Re: Referencing Cell gives incorrect answer but "228" gives correct answer in formula?

    This worked. Thank you soooo much

  5. #5
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Referencing Cell gives incorrect answer but "228" gives correct answer in formula?

    Quote Originally Posted by Clove1 View Post
    This worked. Thank you soooo much
    Great to hear. Please mark thread as SOLVED.

    Cheerio.

+ 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. [SOLVED] UserForm option buttons are displaying "False" instead of the correct answer
    By bradfordahill in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-16-2018, 01:14 PM
  2. Replies: 2
    Last Post: 03-19-2015, 10:15 AM
  3. [SOLVED] populate "skip" labels in userform with the correct answer
    By intex in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-19-2014, 02:36 PM
  4. Replies: 1
    Last Post: 09-21-2013, 03:18 AM
  5. If formula to return "yes" or "no" answer from a range of cells
    By mfairhurst1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-02-2013, 05:00 PM
  6. [SOLVED] "IF" Formula to provide an answer when a Cell is Within a Range
    By jagogo in forum Excel General
    Replies: 8
    Last Post: 03-20-2012, 04:33 PM
  7. Replies: 7
    Last Post: 12-14-2010, 05:38 PM

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