Comments on: How to use IF function in Excel: examples for text, numbers, dates, blanks

IF is one of the most popular and useful functions in Excel. Generally, you use an IF statement to test a condition and to return one value if the condition is met, and another value if the condition is not met. Continue reading

Comments page 6. Total comments: 2999

  1. Hi,
    Could you guys please help me to clear this below issues.

    Cell A1 "APPROVED"
    Cell A2 "APPROVED"
    Cell A3 "APPROVED"

    If(Cell A1:A3="APPROVED", Cell A4="APPROVED", "NOT APPROVED").

    How i can solve this issue.

    1. Hi,
      I believe the following formula will help you solve your task:

      =IF(SUM(--(B1:B3="APPROVED"))=3,"APPROVED","NOT APPROVED")

  2. Hi I really hope I can explain myself well. So basically, if a column contains a 'No' entry, then most of the columns that come after will have an 'N/A' entry. I'm trying to automate this but what I'm struggling to do is if the condition is false, then I don't want anything to happen to the cell (whatever entry in the cell should remain). For instance, If it's a 'No' then I want 'N/A' but if it's a 'Yes' then I'll have to put a date. But what happens is that when I create the formula for the first cell and tries to drag, it changes all my dates to blank which is not what I want. I want the dates to remain.

    Any help would be greatly appreciated, thanks

    1. Hello!
      Sorry, you didn't write your formula. So I am assuming you are using relative cell references. They change when copied. Use absolute cell references.
      If this is not what you wanted, please describe the problem in more detail.

  3. I want to use the if function to populate a cell with 1 of 3 possible values. I have a start time and a finish time which gives a total time worked. I want to take the total time worked and if it is less than 5:30 hours worked then 0:00 break, 5:30 hours to 7 hours is 0:30 break and over 7 hours is 1 hour break. Help would be appreciated.

    1. Hello!
      If I got you right, the formula below will help you with your task:

      =IF(TIME(7,0,0)>B1,TIME(1,0,0),IF(TIME(5,30,0)>B1,TIME(0,30,0),0))

  4. Hello,

    I was wondering if anyone could help me - I am stuck with figuring out a formula to calculate a commission sheet with percentage according to a job role.
    example:
    Person A - gets a commission value in cellA1 and B1 added together however Person B only gets 10% of value in Cell A.

    Can anyone help me figure this formula out? - I tried to make it sound a little like:
    If cell J5="Y" then cell J6 = A1+B1 or if cell J5="N" then J6=10%ofCellA1

  5. I need help with the following

    cell E14 has check box
    cell I14 has check box

    cell E4 has data
    cell F4 has data

    cell F14 is the cell I need filed with the correct data

    What I am trying to accomplish
    if cell E14=true and cell I14=true then fill cell F14 with data from cell E4
    if cell E14=true and cell I14=false then fill cell F14 with data from cell F4

    thanks for your time
    Jason

  6. Im trying to have a column in excel that uses 2 equations based off of a word that is placed in another column .

    for example if J5 says Suburban i want the equation in N5 to be M5*9/100 and show the answer to the equation but if J5 doesn't say this and says Mercedes i want the equation to be M5*11/100 and show the answer.

    Also how do you copy to function down the column so it is using the right line number.

    I thought that I had it but its not giving me the totals

    Thank you!

  7. Thank you so much...i will check

    If Cell G2 contain text ,then how we can solve

      1. This is working fine

  8. And with this i also need to add one more condition....if G2 cell not cotain number then will show "blank"

      1. In this formula "OP" condtion is working fine...But in "IP" when i enter 4 ,it is showing "OUTSIDE".

        As per my codtion it should only when i enter 5

        1. Please help how to solve thiscalculation...In "IP" G25 then "OUTSIDE".

  9. Hi there! I'm looking for assistance with an IF Function.

    I'm looking to create a formula that produces a value IF the value falls between a set of dates.

    For example -

    Date - 05/01/2021
    Value - 600

    Start Date 1 - 01/01/2021
    End Date 1 - 30/01/2021

    Start Date 2 - 01/02/2021
    End Date 2 - 28/02/2021

    The formula should return only 600 as it falls in between Start and End Date 1. Ideally I'd want it to be able to calculate the total value from a List i.e.

    I.e. list of Dates from A5:A55, return value if between Start and End Date 1, Return 0 Value if not between Start and End Date 1

    Hope that makes sense?

  10. I need a formulas for if the cell has a Y then this other cell will enter $25.00 if not it is $0. Please help me. Thank you .

      1. Thank you. It worked!

  11. =If(A2=0,"Closed",(IF(istext(AA2),"Closed","Active"),(IF(AA2=Cancel,"Canceled",AA2=OnHold, "OnHold")))

    My formula will not work. It works when I only put
    =If(A2=0,"Closed",(IF(istext(AA2),"Closed","Active")
    Or
    =IF(AA2=Cancel,"Canceled",AA2=OnHold, "OnHold")
    But I need them together to show the status of the reports if they were to fo on hold or be canceled.

    Any help would be appreciated

  12. Hi there, im trying to put together IF function formula and im struggling.

    It goes something like this,

    =IF(D41="Something1", "$1.000",
    IF(D41="something2", "$1.400",
    IF(D41="something3", "$1.000",
    IF(D41="something4", "$1.000",
    IF(D41="something5", "$1.800",
    IF(D41="something6", "$1.000",
    IF(D41="something7", "$1.400",
    IF(D41="something8", "$1.300",
    IF(D41="something9", "$1.000",)))))))))

    IS this even possible ? how many IFs is possible this way?
    This would really help me .
    thanks in andvance

  13. Good morning, I am trying to make it where if I type N in colum J:J then columns K:K, L:L, M:M, N:N also populate N as well, can anyone help with this formula.

    1. Hello!
      Please try the following formula:

      IF(J1="N","N","")

      Write this formula down in columns K,L,M,N.
      I hope this will help

  14. Hello, is it possible to have a formula return a date? I want Excel to return a date if a column says completed. Thanks!

  15. Hii.
    I want to display a list of names of students who scored a 0 in a test.
    The problem I'm experiencing is of duplicacy.
    Please help.

  16. Hi Guys,
    Can you help me to solve this below mentioned if function in excel?

    =if(E1:E5="APPROVED", "APPROVED", "NOT APPROVED")

    1. Hi,
      Anyone can help me to solve this below mentioned if function in excel?

      =if(E1:E5="APPROVED", "APPROVED", "NOT APPROVED")

      In my document sheet,
      Column E,
      Cell 1 to Cell 5 will be either " APPROVED" or "REJECTED" or "NOT APPROVED"
      In cell 6 I need to use the above function. Text of E1 to E5 are 'APPROVED" then the cell 6 will be shown as "APPROVED" or "NOT APPROVED".

      1. Hello!
        Please use the following formula/the formula below to solve your task:

        =IF(SUM(--(E1:E5="APPROVED"))=5,"APPROVED","NOT APPROVED")

        I hope this will help

        1. Hi Alexander,
          I have tried but it's not working. Could you please explain to me the formula?

          =IF(SUM(--(E1:E5="APPROVED"))=5,"APPROVED","NOT APPROVED")
          about this "--" also =5

          1. Hi,
            If all cells E1 through E5 contain APPROVED, the formula returns APPROVED. What exactly isn't working?

  17. =IF(Sheet2!B3:B15="E1","8","-")
    This is Selvakumaran, for the above given formula i have using this to create a titme table for my teachers, but I couldn't get what i have expect, can u please help me?
    I have entered E1 in one of a cell in a range and I need result as "E1" in another cell but I couldn't get it.

    1. Hi,
      The IF function does not work with data ranges. Therefore, the expression

      IF(Sheet2!B3:B15= ......

      is incorrect.
      I cannot give more detailed advice, since you did not explain the problem in detail.

  18. Hi
    I made this below chart and I want a indicator in AVAILABLE Cell where I need red mark will show if Qty will be 5 Pcs or less than 5 Pcs. Please help me to get this problem solved. Here in AVAILABLE Cell I put the formula like this =IF([@AVAILABLE]="0","-1",[@STOCK]-[@[SALES QTY]])

    STOCK SALES QTY AVAILABLE
    20 Pcs 11 Pcs 09 Pcs ▲
    10 Pcs 09 Pcs 01 Pcs ▲
    05 Pcs 05 Pcs - ▼
    15 Pcs 04 Pcs 11 Pcs ▲
    09 Pcs 04 Pcs 05 Pcs ▲
    10 Pcs 05 Pcs 05 Pcs ▲

    I tried many ways changing the number inside the fomula but failed to correct this.
    Thanks
    Sazedul Munna

  19. Hello, I'm hoping you can help.
    I'm trying to create a formula for the following
    Have multiple Dept (example 3226.7191 33.24.71, etc in Column L) and I have cost associated to each line items in Column R.
    I want to create a formula which summaries the charges for each Dept.
    For example - the forumla would look down column L and if Dept=3226.7191 it would then look at column R and cross-reference all of the charges that appear in column R with all the time that Dept 3226.7191 appears and provides a summary of those charges

    1. Hello!
      You can get a list of values by condition using the FILTER function. Read this detailed guide.
      I hope this will help, otherwise please do not hesitate to contact me anytime.

  20. Hi
    How can i use if condition with range ( have 3 columns and need to say if the number in range A2:c5 more than 10 so its good

  21. I'm trying to replace words.
    Example:
    =IF(A1="XXX",REPLACE(A1,"G2"))

    If the wording in A1=XXX, I want to replace the words in A1 with the words on G2

    This doesn't return anything, what am I missing?

    Thank you, Swann

  22. Hi

    I need a formula in excel that ensures that cell can only be 9 characters long. And the following must show if the entry does not meet the requirements: a stop symbol and an error message that says: the text lenght must be 9 characters?

    Hope you can help

    1. Hello!
      Please check out the following article on our blog, it’ll be sure to help you with your task: Data validation in Excel.
      Use this formula:

      =LEN(A1)=9

      I hope I answered your question. If something is still unclear, please feel free to ask.

  23. I have made a formula

    =+DATEDIF($H$2,G4,"Y")&" years ,"&DATEDIF($H$2,G4,"md")& " Months and "&DATEDIF($H$2,G4,"yd")&" Days"

    Now i want that whenever the result is =0,"Formula","")

    Basically I want the result of the "Formula" when it is true in the value_if_true part else blank but don't want to retype the "Formula" again every time in the value_if_true part in the IF formula

    1. Hello!
      Try the following formula:

      =IF($H$2<>G4,DATEDIF($H$2,G4,"Y")&" years ,"&DATEDIF($H$2,G4,"md")& " Months and "&DATEDIF($H$2,G4,"yd")&" Days","")

      I hope it’ll be helpful.

  24. Hello,

    I need a cell to show"try again" if the answer is incorrect. Can you show me the formula.

    1+5=6 If answer incorrect to display "Try again"
    T6+V6 ANSWER ON W6

    Thank you

    1. Hello!
      I believe the following formula will help you solve your task:

      IF((T6+V6)<>W6, "Try again", "OK")

  25. Hi Svetlana

    I'm trying to build a spreadsheet to progressively record a players best scores on each of 18 golf holes, over four rounds of golf.

    So on day one they will have a score on each of 18 holes. Their total for the 18 holes will be shown at the end.

    On each successive day, if they have a better score on one or more of those holes, then the score for those holes will change, along with their total for 18 holes.

    So as an example:

    Day 1

    HOLE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

    SCORE 2 2 3 2 0 2 3 3 0 2 1 1 2 2 2 1 1 0 29

    Day 2

    HOLE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

    SCORE 2 2 3 3 0 2 3 3 0 2 2 1 2 2 4 1 1 0 33

    On day two, they had a better score on holes 4, 11 and 15, so their overall total increased by 4 to 33.

    This would be repeated on days 3 and 4 and changes made depending on their scores for each individual hole.

    The objective is to determine the players best scores on each of 18 holes, over 4 rounds.

    I would appreciate any help you can give so that I can build my Excel spreadsheet.

    kind regards

    Dave

  26. Can i do such a formula: If value in column A has the letters CC at the beginning, then delete the CC?

    1. Hi,
      Using a formula, you can display the value in another cell and remove extra characters:

      =IF(LEFT(A1,2)="CC",REPLACE(A1,1,2,""),A1)

      I hope my advice will help you solve your task.

      1. Thank you so much Alex.
        Now how do i add to this formula that the last 3 letters should be removed as well?
        For example: if i have a list of the following
        CCGDR3M-1#1.
        CCG5M-05#2.
        CCGD34GM-11#5.
        and i want to remove the CC at the beginning and the #1. or the #2. or the #5. at the end (Note: i want to remove the . as well)

  27. Hi,

    I'm stuck with the following problem.

    I'm trying to work out loss and gain on a starting number so my formula is -

    =IF(C2<D2, "GAIN", "LOSS") and so on...

    However, It will always show "LOSS" in the cell when cell D2 is blank. I only want it to show LOSS if a number has been inputted in both cells. Would anyone know what I need to change for this?

  28. how do i write a formula for
    if a value on a cell is less than or equal 3.99sf on a particular column it should always show and calculate as 4sf on my h column
    Reply

    Alexander Trifuntov (Ablebits.com Team) says:
    February 19, 2021 at 8:21 am

    Hello!
    If I got you right, the formula below will help you with your task:

    =IF(A1<4,4,A1)

    I hope this will help, otherwise please do not hesitate to contact me anytime.

    Hi
    Thank you for your response, it does work but i have assigned different formula already on cell, how can i apply your formula on an entire column, i tried this method and it doesnt work, by the way im doing all this on google sheet.

    1. Hello!
      I wrote this formula based on the description you provided in your original comment. Explain what is not working. If you want to write 2 formulas in a cell, then this is not possible.

  29. how do i write a formula for
    if a value on a cell is less than or equal 3.99sf on a particular column it should always show and calculate as 4sf on my h column

    1. Hello!
      If I got you right, the formula below will help you with your task:

      =IF(A1<4,4,A1)

      I hope this will help, otherwise please do not hesitate to contact me anytime.

  30. Hi,

    I need help trying to create a formula that determines if the cell contains a numeric value or an alphanumeric value. If it is an alphanumeric value, leave it as is, but if it is a numeric value and letters. For example if 123456, then change to INV123456, and if INV123456 leave it alone.

    1. Hi,
      Please check the formula below, it should work for you:

      =IF(ISNUMBER(--(A1)),"INV123456",A1)

      I hope I answered your question.

  31. Hi there
    I have what I believe a very simple comparison to make between two date columns:
    I want to compare column A2 and column B2 and have the formula tell me if A2 is less than B2.
    So far, what I'm using is giving me false results.
    I have tried:
    =A2<B2
    and also
    =IF (A2<B2,"Yes","No") but this also gave incorrect results.

    Example data:
    A2: 08/09/2020
    B2: 14/07/2020
    In this example the query about whether or not A2 is smaller than B2 should yield a "No" result but it is throwing out a "Yes" when it is clear that the A2 date is a greater date.

    My date format is DD/MM/YYYY.

    Can anybody help?

    1. Hi,
      Check your dates. I think that cell B2 is written as text, not as a date. Maybe the date format of 14/07/2020 does not match your Windows date format. Maybe the correct format is 07/14/2020. Check the date and time settings in the Control Panel.

    2. Hi all... please ignore my query! I've worked it out.

      Simply had to run Date - Text to Columns on my Date columns (already formatted as Date Format) in order to get the formula to compare the dates properly.

      Hope this helps someone else!

      cheers
      Kaz

      1. Gah! Typo... that solution was:

        Data - Text to Columns (NOT Date - Text to Columns).

        Time to sign out!

        -Kaz

  32. Hello Alexander,
    If you are able to assist me with my request, it would be greatly appreciated. I am trying to have a cell be copied from sheet 1 to sheet 2 when an "if" value is met. For example:

    if a cell in the d column on sheet 1 reads "T", then I want the matching cell in e column to be copied to sheet 2.

    The context is, that when a task is Tabled (T), in my list of things done in that day (Sheet 1), then on the following sheet (Sheet 2), a list of future tasks will be created. As the task is completed, I would change the status on the original page, and the task would no longer be carried over to the corresponding cell on sheet 2 . This would assist me in organizing my weekly to-do list.

    Thank you for considering my request.
    M.Tucker

    1. Hello!
      Here is the article that may be helpful to you: Vlookup multiple matches and return results in a column.
      and this article: Excel reference to another sheet or workbook (external reference).
      Use an array formula

      =IFERROR(INDEX($E$2:$E$13, SMALL(IF($H$1=$D$2:$D$13, ROW($E$2:$E$13)-1,""), ROW()-2)),"")

      This is an array formula and it needs to be entered via Ctrl + Shift + Enter, not just Enter.
      Change the links in the formula according to your data.
      After that you can copy this formula down along the column.

      I hope my advice will help you solve your task.

  33. Hi Alexander. I am blown away by the amount of answers you have addressed in this thread! Thank you for offering so much value out there...hoping that mine will be included ;-)

    I am trying to use an IF(ISNUMBER(SEARCH formula to perform a calculation based on whether a partial text match exists. I am wanting to pull the text from a cell and use that cell address in the formula to test for a partial match in another field. Otherwise I will be required to manually input the text multiple times throughout the formula. I'm having issues getting the formula to pull my text from a cell....for example:

    =IF(ISNUMBER(SEARCH("*b3*",B$15)), C$15, C$21) where the text I'm looking for is located in cell b3. Is there syntax that will accomplish this?

    1. Hello!
      If I got you right, the formula below will help you with your task:

      =IF(ISNUMBER(SEARCH(B3,C$15,1)), C$15, C$21)

      You can read more about the SEARCH function in this article.

      1. Thanks Alexander! That is so obvious now that I see it that I am embarrassed. I've tried it and it works perfectly. Thank you again for your quick, straightforward help!

  34. Struggling with an If statement.

    =(IF(D4="S", ((H4-F4)/(F4-I4), (IF(D4="L",((F4-H4)/(I4-F4))))

    what I tried entering. keeps rejecting the formula.
    It's my trade journal and looking to determine risk rewad. So when I go Long it needs the L formula and Short the S.

    Appreciate any help

    1. Hello!
      I can’t test your formula as it uses your data.
      Try the following formula:

      =IF(D4="S", (H4-F4)/(F4-I4), IF(D4="L",(F4-H4)/(I4-F4),""))

      Hope this is what you need.

  35. I saw that you really active in replying comments ^^.
    I want some answers too for my problem.

    Is it possible to put/show results to another cell? (i dont know what this method called/its name; or this cant be implemented in Excel)

    Lets say:
    A1 value is 0
    A2 value is 0
    A3 value is 0
    A4 value is 0

    When A1 value turn to 1
    A2 = 200
    A3 = 400
    A4 = 600

    Its something like this,
    if A1 =1, A2 = 200*A1 | A3 = 400*A1 | A4 = 600*A1

    A single cell that using fuction, and write the results into other cell

    Is it possible?
    THanks

    1. Hello!
      An Excel formula can only write the result to the cell in which it is located. If a value has already been written in a cell, then it can only be changed using a VBA macro

      1. Thanks ya ~ i will look into VBA.

  36. I am working on a daily deployment graph where the hours someone begins a shift is in column A and the time they leave is in column B. If cell A1 shown 1100 and Cell B1 shows 1300, I want cell P1, Q1, AND R1 to turn white filled. =if(a1=1100, P1:Q1*WHITE) or something like this if that makes sense?

  37. How to formulate this into the function

    if cell A1 is multiplied by a number then put value of 1 in cell A2

    1. hello!
      How do you want to know that cell A1 is being multiplied by a number? Please describe this condition in detail.

  38. Hi.

    I'm trying to lookup if text matches to return a text string and if it doesn't match, to lookup in another sheet, but it only is seeming to check the first lookup, not the second.

    =IF(VLOOKUP(C2687,'Master Data'!A:A,1,FALSE)=C2687, "regular listed", IF(VLOOKUP(C2687,'Community Service - Master Data'!A:A,1,FALSE)=C2687, "community service", "No Master Data!"))

  39. Hello I'm looking to have the formula work: =ISTEXT(IF('Investment Center'!$B$6:B26=E46,'Investment Center'!$C$6:C26))

    All fields are text and I want to have the following logic. If anywhere within Investment Center'!$B$6:B26 equals to E46 then return value of 'Investment Center'!$C$6:C26. All entires are text.

    1. Hello!
      If I understand you correctly, you want to return not one value, but an array. Then try this formula

      =IF(SUM(--(B6:B26=$E$46))>0,C6:C26,"")

      Hope this is what you need.

  40. Hello.
    I'm trying to us an IF function to a cell that has a small formula F7 has this formula(=F1-F2) but it wont work. It will work if I type the correct number in there but if it is coming from the small formula it is coming up up as "False" Can you help?
    F7 has this formula (=F1-F2)
    Example: If F7...
    is greater than or equal to 0.5 then 2
    is less than or equal to -0.5 then -2
    is in the range of 0.4 to -0.4 then 1
    All in one formula?
    I hope that makes sense.

    1. Hello!
      If I understand your task correctly, the following formula should work for you:

      =IF((F1-F2) >= 0.5,2,IF((F1-F2) <= -0.5,-2,IF(AND((F1-F2) >= -0.4,(F1-F2) <= 0.4),1,"")))

      I hope it’ll be helpful.

  41. Hi.

    I am trying to do a product costing spreadsheet. working with 3 different rates of VAT. i'm hoping to indicate which one of the rates applies to the product with a check box? and then using the IF function to give me 'cost per item' based on what rate is selected because the others don't apply.

    Hope this makes sense :)

    1. Hello!
      You can check 3 boxes for each VAT. With the IF function, you will check the value of 3 cells. You can also use the dropdown list and specify 3 VAT values in it. Then, in the formula, just use the value from the dropdown list.
      I hope this will help, otherwise please do not hesitate to contact me anytime.

  42. I have a question I am using IF function to a cell, if the cell is FALSE, it will appear as blank. But when a date is inputted i want it to add 2 more days. Is that possible? or how can i do that?

    1. Hello!
      If I understand your task correctly, the following formula should work for you:

      =IF(A1=FALSE,"",IF(CELL("format",A1)="D4",A1+2,""))

      You can learn more about CELL function in Excel in this article on our blog.
      I hope I answered your question. If something is still unclear, please feel free to ask.

  43. I WANT A HELP
    IF i= 5
    in cell A1 it shall write A1
    in cell A2 it shall write A2
    in cell A3 it shall write A3
    in cell A4 it shall write A4
    in cell A5 it shall write A5

    1. Hi,
      I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
      What does the condition i = 5 mean?

  44. Hi
    I have a problem to use IF statement to give me text value when a numeric value condition is met.
    Example:
    If cell "A" is more than "15" should give text "H" (High) in cell B, if value equals "5" but less than "15" should give "M" (Medium), and less than "5" should give "L" (Low).

    I will appreciate your help.
    Thanks

  45. Good Morning!

    Hello Ma'am/Sir,

    I have some problems regarding date formula.

    =IF(EXACT($K9,"NOT DONE"),EXACT($K9,"DONE"),TODAY())

    That is the formula that i created if the value in the cell is "DONE" & "WIP" today Date will be shown in the cell. And if the value is different the cell value would be "NA" but the issue if i am putting next argument the excel showing an error "You've entered too many arguments for this function" this is the formula i created where error is showing =IF(EXACT($K9,"NOT DONE"),EXACT($K9,"DONE"),TODAY(),"NA") If you can help me with this it will be a big help.

    Another thing Ma'am & Sir,

    =IF(EXACT($K9,"NOT DONE"),EXACT($K9,"DONE"),TODAY()) for this formula once if i put the text "DONE" & "WIP" the today date will shown but the issue is once it is in the next day the next day date will be updated in the cell i want it like when i put Done and WIP today date will be there but if it is possible it will not change on the next day or the other date. Like when they put DONE or WIP in today date it will not change the date by tomorrow it self because it is updated once the date change by the next day.

    It will be a big help for me if you will answer it thanks and regards.

  46. Hi, I'm trying to use an if function to check if a string value matches it, it adds the corresponding numeric value to a cell but it doesn't work.

    =If(C10:C43="Income",J10:J43+H7, H7+0)

    So basically, I want the sheet to check that if Income is selected on the C range, the value from J is then added to the cell H7. This is for an expense tracker that I'm currently working on.

    I'm new to this and I really appreciate any help.

    1. Hello!
      In a cell like K10, you can use a formula

      =IF(C10="Income",$H$7+J10, $H$7)

      Then copy this formula down the column.
      I hope my advice will help you solve your task.

  47. Hi Can any one tell me how can i fill the Colour in Excel file. For text like Green , Yellow, Red. Etc.

    1. Just use conditional formatting

  48. Hi,

    I need help in Excel cell. I want to fill the time only if if is not filled. To fill the time I am already using IF statement =IF(E2 "", NOW(), ""), so trying to solve with nested IF statements. But unfortunately it is not working.

    With statement =IF(E2 "", NOW(), "") - it is filled the value in Coloumn B2 with now time, but it if I enter in new row, the time in previous row get updated. Can you please help.
    Regards

    1. If you want the formula to fill in the blanks then it should be =IF(E2="", NOW(),B2)

      Now() function is dynamic so it will continuously update. If you want previous entries to stay static then you need to copy+paste as values.

  49. Hi,

    I need help in Excel cell. I want to fill the time only if if is not filled. To fill the time I am already using IF statement =IF(E2 "", NOW(), ""), so trying to solve with nested IF statements. But unfortunately it is not working.

    With statement =IF(E2 "", NOW(), "") - it is filled the value in Coloumn B2 with now time, but it if I enter in new row, the time in previous row get updated. Can you please help.

    Regards, Surinder

    1. Hello,

      I'm creating a Sales order form where I use the following formula -
      =if(and(F18>0, D18>0, E18>0),C18*D18*E18*(1-F18),"")

      So what I'm trying to do is to multiply cells C18 through E18 and if there is a discount amount in cell F18, then include it and get the final net price which includes the discount amount. This is fine and works.

      What I can't make work is to multiply cells C18 through E18, but if there's no discount amount (cell E18 is left blank), I would still get the net price without the discount code.

      I hope this makes sense! Any help would be greatly appreciated!

      Thanks!

  50. IF AND OR?

    E4 is the sum of points a team gets as per awarded in A1:A3. If Team Bob is in A1 they get 7 pts. If in A2 they get 5 pts. If in A3 they get 2 pts. Ergo, possible totals are 2,5,7,9,12,14 points.

    For cell E4:
    IF(A1="Bob",A2="",A3="", 7)
    IF(A1="Bob",A2="Bob",A3="", 12)
    IF(A1="Bob",A2="Bob",A3="Bob", 14)
    IF(A1="Bob",A2="",A3="Bob", 9)
    IF(A1="",A2="Bob",A3="", 5)
    IF(A1="",A2="Bob",A3="Bob", 7)
    IF(A1="",A2="",A3="Bob", 2)

    IF(A1="",A2="",A3="", 2)

    Last statement is to say that if NONE of the above is true, enter "0" at E4

    The same calculation would occur for 4 other team: Carol(E5), Ted(E6), Alice(E7), Sam(E8)

    Thanks!

    1. Could not edit to a note here... my "last statement" above should be IF(A1="",A2="",A3="", 0)

Post a comment



Thanks for your comment! Please note that all comments are pre-moderated, and off-topic ones may be deleted.
For faster help, please keep your question clear and concise. While we can't guarantee a reply to every question, we'll do our best to respond :)