+ Reply to Thread
Results 1 to 5 of 5

If function for multiple cells?

  1. #1
    Registered User
    Join Date
    02-05-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    2

    If function for multiple cells?

    Good evening,

    I hope someone can help me with my Excel problem...

    I have 25 cells, that can either have a value of 0 or o.2
    The cells have to be added up. No problem there ofcourse.
    But if a cell has a value of 0, -0.25 should be subtracted from the total.

    I have this formula, but I'm not sure how to use it for multiple cells:

    =IF(M20,0,-0.25)

    Does anyone have a clue?
    Thanks,

    Car

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: If function for multiple cells?

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: If function for multiple cells?

    You may try:
    =SUM(M20:M44)-COUNTIF(M20:M44,0)*0.25
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  4. #4
    Registered User
    Join Date
    02-05-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: If function for multiple cells?

    It works! Thank you so much!

  5. #5
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: If function for multiple cells?

    You are welcome.

+ 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] If And Or Left function in multiple cells
    By sans in forum Excel General
    Replies: 13
    Last Post: 04-24-2012, 04:30 AM
  2. Replies: 5
    Last Post: 01-20-2009, 11:56 AM
  3. apply function to multiple cells
    By soldsomebeef in forum Excel General
    Replies: 4
    Last Post: 09-10-2007, 06:49 AM
  4. refrencing multiple cells in a function
    By Don Juan in forum Excel General
    Replies: 3
    Last Post: 09-25-2006, 01:37 AM
  5. [SOLVED] Multiple cells in cells function
    By Adam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2006, 12:10 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