+ Reply to Thread
Results 1 to 6 of 6

Multiply cells only if a cell is nonblank

  1. #1
    Forum Contributor
    Join Date
    10-15-2012
    Location
    Dallas, TX
    MS-Off Ver
    2019
    Posts
    167

    Multiply cells only if a cell is nonblank

    In the attached spreadsheet, I wish to run the below calculation in DATA J2. However, I only want (I2+H2)/2 to occur if H2 is nonblank. If H2 is blank, then only calculate (=I2-E2).
    Please Login or Register  to view this content.
    Basically, I want to...

    Calculate ((I2+H2)/2)-E2 if H2 is nonblank, otherwise calculate =I2-E2
    Attached Files Attached Files
    Last edited by cableghost; 05-11-2021 at 04:03 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Multiply cells only if a cell is nonblank

    Try this

    =IF(ISBLANK(H2),I2-E2,((I2+H2)/2)-E2)

    Just place that formula in your J2 and copy down
    Last edited by cubangt; 05-11-2021 at 02:21 PM.

  3. #3
    Forum Contributor
    Join Date
    10-15-2012
    Location
    Dallas, TX
    MS-Off Ver
    2019
    Posts
    167

    Re: Multiply cells only if a cell is nonblank

    Quote Originally Posted by cubangt View Post
    =IF(ISBLANK(H2),I2-E2,((I2+H2)/2)-E2)
    This appears to work... thanks!

  4. #4
    Forum Contributor
    Join Date
    10-15-2012
    Location
    Dallas, TX
    MS-Off Ver
    2019
    Posts
    167

    Re: Multiply cells only if a cell is nonblank

    I now do recognize its throwing an error... 'Inconsistent Calculated Column Formula', but the calculation seems to be correct

  5. #5
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Multiply cells only if a cell is nonblank

    In the error box that shows up to the side of the cell, select the 2nd option "Restore to calculated column formula" and reapply down the rest of the cells
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  6. #6
    Forum Contributor
    Join Date
    10-15-2012
    Location
    Dallas, TX
    MS-Off Ver
    2019
    Posts
    167

    Re: Multiply cells only if a cell is nonblank

    Quote Originally Posted by cubangt View Post
    In the error box that shows up to the side of the cell, select the 2nd option "Restore to calculated column formula" and reapply down the rest of the cells
    Tried that... this new formula is wiped out and the old calculation is returned.

    Edit: Got it figured out.

+ 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] Search Range for NonBlank Cells, Fill Down only one cell below NOT all Blank cells belof
    By safari20WDG in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-07-2017, 01:23 AM
  2. Highlight the 1st NonBlank Cell upto the last NonBlank
    By Jarvin24 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-19-2015, 12:11 AM
  3. [SOLVED] How to populate blank cells with sequence until nonblank cell is encountered?
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-23-2014, 08:47 AM
  4. Replies: 2
    Last Post: 12-22-2011, 07:05 PM
  5. please help: find nonblank cell in group of cells...
    By spanic in forum Excel General
    Replies: 2
    Last Post: 08-08-2006, 05:07 PM
  6. [SOLVED] How do I count nonblank cells that meet criteria in another cell?
    By jimswinder in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-20-2006, 11:45 AM
  7. Replies: 2
    Last Post: 01-05-2005, 05:06 PM

Tags for this Thread

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