• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Extract Target Setting and Compare the Result

cyliyu

Member
I have a spreadsheet with a target set for the year 2022 in column C.
The total (Jan to Dec) will be calculated in Column P.

I'm attempting to perform the comparison using the formula below, to compare (extract and compare) the result with the set target, but I'm not getting the desired result.

=IF(P4>MID(C3,3,2),"Y","N")

Attached file the sample sheet.
 

Attachments

  • Book1.xlsx
    24.3 KB · Views: 5
MID(C3,3,2) is text whereas P4 is a number. To make a numeric comparison the first term needs to be converted to a number. The VALUE function is intended for that purpose.
=IF(P4>VALUE(MID(C3,3,2)),"Y","N")
 
Back
Top