+ Reply to Thread
Results 1 to 4 of 4

HELP With IF command and formulas

  1. #1
    Registered User
    Join Date
    11-24-2020
    Location
    Brisbane, Australia
    MS-Off Ver
    MS Office 2020
    Posts
    2

    HELP With IF command and formulas

    Hi,

    Bit of a noob when it comes to Excel (been quite a few years) and setting up a quantity spreadsheet for work.
    I have created an IF command that returns #VALUE! errors if the result is false. Hoping its a simple error with the format of my formula and chasing some help please.

    I have attached the spreadsheet in question, but basically I need the following:

    1. Result in F44 to equal ((E44-C35)*C44) if the data entered in D44 is '5'.
    2. If the data entered in D44 is not '5' I would like a blank cell returned.
    3. Also, on top of that, if the data entered in L44 is '2' I need to add (C44*C35) to the result in step 1.

    Currently if I enter anything other then a 5 in cell D44, I get a #VALUE! error.

    Please help!!

    Thanks, Jamie
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: HELP With IF command and formulas

    Without IF, it may be shorter:
    In F44:
    =(($L44=2)*$C$35+($D44=LEFT(F$43)+0)*($E44-$C$35))*$C44

    Drag accross to G and H
    Quang PT

  3. #3
    Registered User
    Join Date
    11-24-2020
    Location
    Brisbane, Australia
    MS-Off Ver
    MS Office 2020
    Posts
    2

    Re: HELP With IF command and formulas

    Thanks bebo.

    That formula did work with some alterations (=(($L44=2)*$C$35+($D44=LEFT(D$44)+0)*($E44-$C$35))*$C44).

    However, I should have mentioned I require columns F, G & H to return results based on whether 3, 4 or 5 is entered in column D.

    In column F, I need results if a 5 is entered at column D. And a blank cell returned in columns G & H.
    In column G, I need results if a 4 is entered at column D. And a blank cell returned in columns F & H.
    In column H, I need results if a 3 is entered at column D. And a blank cell returned in columns F & G.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,566

    Re: HELP With IF command and formulas

    Building on bebo's formula try pasting the following into cell F44 and then drag the fill handle across to cell H44:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Command button to add a new row in G14 with these formulas?
    By Mr.Castle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-05-2018, 08:28 PM
  2. Insert New Row With Formulas Using Command Button
    By venom_active in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-16-2016, 06:02 AM
  3. Insert new row using a Command Button and keep formulas
    By luckylulu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2016, 02:08 AM
  4. Add a new row with formulas From command button
    By jazz56 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-17-2013, 03:18 PM
  5. Command Button using VBA, to insert a row with formulas below
    By AlexKost in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2013, 11:50 PM
  6. 3 formulas in 1 cell using replace command
    By noviceuser1 in forum Excel General
    Replies: 1
    Last Post: 01-18-2008, 05:35 PM
  7. Can I insert roundup command into different formulas in excel?
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 07:05 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