+ Reply to Thread
Results 1 to 12 of 12

Expanding a complex IF/AND formula

  1. #1
    Registered User
    Join Date
    05-15-2016
    Location
    Edinburgh
    MS-Off Ver
    2007
    Posts
    6

    Expanding a complex IF/AND formula

    Hello,
    I am creating a stock sheet to count stock in various locations and add up to a total. One problem I've got is that some of the items counted (e.g. napkins) are weighted instead of counted to save time and a weight of one unit is recorded on the spreadsheet. This way I can calculate the number of units from the total weight of a product (e.g. if one napkin weights 0.0018kg then in one kilogram there are around 555 napkins). I've got a formula in the spreadsheet already but it only relates to one location. I'm trying to understand it but I'm having a hard time, basically I need to expand the formula to include more locations.
    I'm sorry if this is hard to follow. I'll try to explain as much as I can:

    B50 contains this formula: =IF(AND(E50=0,I50>0)=TRUE,"no weight",IF(I50>0,SUM(F50*C50,G50*D50,H50,I50/E50),SUM(F50*C50,G50*D50,H50)))
    It only takes into account cells F, G, H and I. I need to expand it all the way to U.
    Essentially "full" is a full case and a number of units in each case is specified in "case size". "Sleeves" is a number of packages inside a case and a number of units inside each sleeve is specified in "inner size". "Singles" is just single units counted and "weighted" is weight of a certain number of items in kilograms. The total obviously adds all of it together (in number of units).

    Untitled.png

    I would appreciate any help to expand this formula as so far I have failed in getting my head around it. I'll answer any questions if my explanation was too chaotic.
    Thanks!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,989

    Re: Expanding a complex IF/AND formula

    Welcome to the forum!

    To help us to help you, please attach a sample workbook. Make sure there is just enough data to demonstrate your need. 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 shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-15-2016
    Location
    Edinburgh
    MS-Off Ver
    2007
    Posts
    6

    Re: Expanding a complex IF/AND formula

    Hi Ali,

    thanks for such a quick reply! Here is a sample workbook, hopefully this will make it clearer.

    Thanks!
    Kamila
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,989

    Re: Expanding a complex IF/AND formula

    Is this going to grow any more, or are the four categories fixed?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,989

    Re: Expanding a complex IF/AND formula

    Try this:

    Please Login or Register  to view this content.
    Last edited by AliGW; 05-15-2016 at 12:44 PM.

  6. #6
    Registered User
    Join Date
    05-15-2016
    Location
    Edinburgh
    MS-Off Ver
    2007
    Posts
    6

    Re: Expanding a complex IF/AND formula

    The categories are fixed, there might be more products added but not in a way that would affect the formula.

    Pasted it and it came up with #NAME?.

    I completely reworked the original spreadsheet, is it possible that the original formula refers to something I erased? (e.g. the "no weight" bit?)

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,989

    Re: Expanding a complex IF/AND formula

    If you have reworked the spreadsheet, then you will need to provide the reworked version! My suggestion works in your sample sheet.
    Attached Files Attached Files
    Last edited by AliGW; 05-15-2016 at 12:38 PM.

  8. #8
    Registered User
    Join Date
    05-15-2016
    Location
    Edinburgh
    MS-Off Ver
    2007
    Posts
    6

    Re: Expanding a complex IF/AND formula

    The categories are fixed, there might be more products added but not in a way that would affect the formula.

    Pasted it and it came up with #NAME?.

    I completely reworked the original spreadsheet, is it possible that the original formula refers to something I erased? (e.g. the "no weight" bit?)

  9. #9
    Registered User
    Join Date
    05-15-2016
    Location
    Edinburgh
    MS-Off Ver
    2007
    Posts
    6

    Re: Expanding a complex IF/AND formula

    Sorry, here's the actual spreadsheet I'm working on. There are several sheets but it's the "counts" one that needs the formula.
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,989

    Re: Expanding a complex IF/AND formula

    Try this:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    05-15-2016
    Location
    Edinburgh
    MS-Off Ver
    2007
    Posts
    6

    Re: Expanding a complex IF/AND formula

    Looks like it's working! You're an absolute star Ali, thank you so much for your help!

    Kamila

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,989

    Re: Expanding a complex IF/AND formula

    You're 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. A formula for expanding complex formulas???
    By Solid Jexcel in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-16-2015, 05:08 AM
  2. Expanding Formula
    By cfieser in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-02-2013, 01:33 PM
  3. Expanding a complex range reference
    By bob lad in forum Excel General
    Replies: 5
    Last Post: 03-05-2010, 12:01 PM
  4. expanding an IF formula
    By tvonbehren in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-30-2009, 03:20 PM
  5. Expanding on a formula
    By MartinW in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-20-2006, 08:10 AM
  6. Expanding Formula Bar
    By Domingo in forum Excel General
    Replies: 4
    Last Post: 12-25-2005, 08:34 PM
  7. Help With Expanding A Formula
    By Minitman in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-18-2005, 02:06 AM

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