Share via

IF statement

Niki M Hiles 0 Reputation points
2026-02-25T18:21:23.35+00:00

I need to add % to a dollar amount based on the year before. How do I do an if statement. Example: if 2026=$25,891,151 and i want to add 3.26% for 2027. Need to take in account if 2026 =0

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Barry Schwarz 5,346 Reputation points
    2026-02-26T05:30:58.23+00:00

    If the 2026 value is 0 you want to leave the 2027 value unchanged. That means the 2027 cell may contain a value. Therefore it doesn't contain a formula.

    If the 2026 value is not 0, you want to compute the 2027 value based on the 2026 value, regardless of any existing value in the 2027 cell. That would normally require a formula in the 2027 cell but the cell may already contain a value.

    The answer is a macro. You select the 2026 cell and invoke the macro. The macro checks the selected value and

    • if 0, exits
    • if non zero, computes the new value, stores it in the 2027 cell, and exits.
    0 comments No comments

  2. Hendrix-C 12,030 Reputation points Microsoft External Staff Moderator
    2026-02-25T18:40:35.4533333+00:00

    Hi @Niki M Hiles,

    Thank you for posting your question in the Microsoft Q&A forum.

    For clearly understand the situation, can you please share some more details about your expected outcome so I can provide the most appropriate solution for your concern. I greatly appreciate your cooperation and understanding.

    • When 2026 = 0, do you want 2027 to be 0, blank, keep the value already in 2027 cell or some other value?
    • Is the rate always 3.26% or does it vary by year/percentage of the value in 2026 or something else?
    • What is your expected sheet layout? (e.g. amount of 2026 in B2 = $25,891,151, in B3 calculate the amount of 2027, etc.)

    Please understand that my initial response may not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution. 

    Thank you for your understanding and cooperation. I look forward to hearing from you.


  3. Niki M Hiles 0 Reputation points
    2026-02-25T18:25:27.47+00:00

    What if 2026 is 0, how do I keep 2027 as is. I need to add % to a dollar amount based on the year before. How do I do an if statement. Example: if 2026=$25,891,151 and i want to add 3.26% for 2027. Need to take in account if 2026 =0. If then statement?

    0 comments No comments

  4. Q&A Assist
    2026-02-25T18:21:32.73+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To implement an IF statement in Excel for your scenario where you want to add a percentage to a dollar amount based on the previous year's value, you can use the following formula:

    =IF(A1=0, 0, A1 * (1 + 3.26%))
    

    In this formula:

    • A1 represents the cell where the 2026 dollar amount (e.g., $25,891,151) is located.
    • The IF function checks if the value in A1 is 0. If it is, the formula returns 0. If it is not, it calculates the new amount by multiplying the value in A1 by 1 plus the percentage increase (3.26%).

    This way, if the 2026 amount is zero, the result for 2027 will also be zero; otherwise, it will reflect the increased amount based on the specified percentage.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.