+ Reply to Thread
Results 1 to 3 of 3

Excel formula help

  1. #1
    Registered User
    Join Date
    04-26-2024
    Location
    US
    MS-Off Ver
    2018
    Posts
    1

    Excel formula help

    Screenshot 2024-04-27 123630.jpg


    Hi, I am trying to re-write a formula for K7. The formula in K7 works fine as long as I have data in F7 and J7 =SUM(F7*0.6 + J7*0.4). Where I am having problems is if F7 or J7 = 0. If either cell F7 or J7 equals zero, I would like to only use only the cell (F7 or J7) that has a numerical value for K7 instead of combining the percentage of F7 or J7 in K7.

    With the following exceptions: if cell B7 is zero but C7, D7, or E7 have any values F7 will still be zero but and I would still like to apply it in the K7 formula. If B7 through E7 are Zero then K7 would equal J7.

    The same exception with cell G7, if G7 is Zero but if cells H7 and I7 have numerical values other than zero I would like it to also apply in the K7 equation. If G7 through I7 are Zero then K7 would equal F7.

    Hope this makes sense, thank you for any help.
    Attached Files Attached Files
    Last edited by Grahambp; 04-26-2024 at 11:40 PM.

  2. #2
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,475

    Re: Excel formula help

    What is your expected result for K7: K14? Why did the attachment not appear when G1, H1, and I1 were mentioned in the description?

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Excel formula help

    You only need to use the SUM function is you are adding a range of cells. for what you are trying to do, you could just use...
    =F7*0.6 + J7*0.4
    This should eliminate your problem, as if eg F7 = 0 the answer will be 0
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Formula for stock cover/ days in inventory and also generate excel formula for it
    By james brownson in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-14-2021, 01:41 AM
  2. [SOLVED] VBA, User-defined formula argument referring to cell value calculated by Excel formula
    By ARAGORN II in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2017, 01:57 PM
  3. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  4. Replies: 10
    Last Post: 12-16-2015, 03:16 PM
  5. Replies: 2
    Last Post: 03-21-2014, 11:43 AM
  6. Replies: 0
    Last Post: 03-19-2012, 07:32 PM
  7. Replies: 1
    Last Post: 03-04-2012, 12:03 AM

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