+ Reply to Thread
Results 1 to 6 of 6

If function formula

  1. #1
    Registered User
    Join Date
    09-24-2022
    Location
    London
    MS-Off Ver
    Microsoft Office 2019
    Posts
    70

    If function formula

    Hello - I tried the formula that if A is greater than 3 days, then it shows 1 and if not, then it come 0.
    It come VALUE! error.

    Attached file
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    29,592

    Re: If function formula

    You are comparing a TEXT string with TODAY() which is simply a number in Excel (45004 for today) so I am not sure what you are attempting to do..
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    09-24-2022
    Location
    London
    MS-Off Ver
    Microsoft Office 2019
    Posts
    70

    Re: If function formula

    Thank you for the giving answer.
    Actually i want to apply condition with the help of IF function in Text.
    The condition is if A is greater than 3 days, then it should show 1 and if not, then it should show 0.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    29,592

    Re: If function formula

    You date to compare a DATE in A otherwise all you can compare is the DAY(S) value > 3: so in A1 are you comparing 58 > 3 ??
    Last edited by JohnTopley; 03-19-2023 at 07:53 AM.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.89 for Mac MS 365
    Posts
    8,575

    Re: If function formula

    who controls what is in column A?
    if you do, this would be one way to accomplish that.
    for all cells in col A make sure they are filled in the same way, so A2 and A3 both start with days but A4 and A5 do not.
    So change those to 0 day(s), 0 hour(s) etc.
    then this formula will work...
    =IF(TODAY()-3>TODAY()-(--LEFT(A2,SEARCH(" day(s)",A2)-1)*24+(--MID(A2,SEARCH(" hour(s)",A2)-2,2))+(--MID(A2,SEARCH(" minute(s)",A2)-2,2)/60))/24,1,0)
    see attached
    Attached Files Attached Files
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  6. #6
    Registered User
    Join Date
    09-24-2022
    Location
    London
    MS-Off Ver
    Microsoft Office 2019
    Posts
    70

    Re: If function formula

    Actually i practice how we can i change and extract any format to number format.
    I have learned a lot from this formula.

    Thank you so much JohnTopley and Sam Capricci. It is very helpful.

+ 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] Index/Match function - lookup cell is formula, want it to look for result of formula
    By cornmama1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-22-2021, 01:14 PM
  2. Replies: 11
    Last Post: 01-05-2021, 07:17 PM
  3. Formula Structure Error When Combining IF Function with VLOOKUP Function
    By EverClever in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-16-2017, 03:11 PM
  4. Replies: 7
    Last Post: 10-18-2016, 02:13 PM
  5. Multiple Vlookup Normal Formula (not array formula) or VBA Function Required
    By BoopathiK in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-17-2015, 03:06 AM
  6. Formula Creation: Using List Function + Subtraction Function
    By HelpMe! in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2013, 04:52 PM
  7. Replies: 0
    Last Post: 01-19-2013, 01:35 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