+ Reply to Thread
Results 1 to 9 of 9

Advanced Formula to calculate if a certain action is required using 'IF' formula

  1. #1
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan, USA
    MS-Off Ver
    MS Office 2007
    Posts
    5

    Advanced Formula to calculate if a certain action is required using 'IF' formula

    Let me start off with an introduction. We are a small landscape supply company that makes a lot of deliveries yearly. We enter all of our delivery information into a spreadsheet with a lot of details on it. The formula I want to create looks for certain receipt number ranges and location codes to produce a simple yes or no result.
    Example:

    Delivery Receipt # Loading Location Material Billing Needed? Delivery Billing Needed?
    9600 LW This should result in Yes This should result in Yes
    120105 LW This should result in No This should result in No
    101082 MP This should result in Yes This should result in No
    3782 LW This should result in Yes This should result in Yes

    Receipt Numbers for our various locations have the following ranges:
    1000-5000 MWFLW
    6000-9000 MWFQU
    12000-15000 MWFBOR
    9001-11000 MP
    120000-200000 LW
    100000-118000 QU

    Hoping somebody can help me with this or have a suggestion.

    Thanks,

    AK

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Advanced Formula to calculate if a certain action is required using 'IF' formula

    Welcome to the forum chipsgro,

    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.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan, USA
    MS-Off Ver
    MS Office 2007
    Posts
    5

    Re: Advanced Formula to calculate if a certain action is required using 'IF' formula

    https://drive.google.com/file/d/1u2n...ew?usp=sharing

    Here is a link to a sample view of my workbook.

  4. #4
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan, USA
    MS-Off Ver
    MS Office 2007
    Posts
    5

    Re: Advanced Formula to calculate if a certain action is required using 'IF' formula

    Here is the workbook as an attachment
    Attached Files Attached Files

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

    Re: Advanced Formula to calculate if a certain action is required using 'IF' formula

    If I understand correctly then there could be a table of receipt numbers and locations somewhere in the workbook. I placed such a table on sheet 2. Notice that it is sorted (least to greatest) by the first receipt number associated with each location.
    The formulas (shown in C8:D11) are as follows:
    For Material Billing Needed: =IF(INDEX(Sheet1!C$3:C$8,MATCH(A8,Sheet1!A$3:A$8,1))=B8,"no","yes")
    For Delivery Billing Needed: =IF(A8>=100000,"no","yes")
    If these formulas don't continue to yield the expected results, I would suggest uploading more samples in columns A and B along with expected outcomes (and explanations).
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan, USA
    MS-Off Ver
    MS Office 2007
    Posts
    5

    Re: Advanced Formula to calculate if a certain action is required using 'IF' formula

    I have another question regarding this formula. I am working on another version. Basically, I need an IF formula to return a value of yes or no. Data Flow: If B2 is less than or equal to 9500 AND B2 is greater than or equal to12001 then YES. if B2 is b/t 9501 and 12000 then NO.

    Here is the formula I have now: =IF(AND(B2<=9500,B2>=12001),"no","yes". I think I know why this isn't working. the and creates multiple 'logical tests' and there is only 1 set of answers. not sure how to express this in the formula though.

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

    Re: Advanced Formula to calculate if a certain action is required using 'IF' formula

    if B2 is b/t 9501 and 12000 then NO
    It isn't possible for a cell to contain a single value that is both <=9500 and >=12001
    It is possible for a cell to contain a value that is both >9500 and < 12001
    To get that you could write: =IF(AND(B2>9500,B2< 12001),"no","yes")
    Similarly: =IF(OR(B2<=9500,B2>=12001),"yes","no")
    Let us know if you have any questions.

  8. #8
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan, USA
    MS-Off Ver
    MS Office 2007
    Posts
    5

    Re: Advanced Formula to calculate if a certain action is required using 'IF' formula

    Awesome thank you

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

    Re: Advanced Formula to calculate if a certain action is required using 'IF' formula

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link in the ribbon above your first post. I hope that you have a blessed day.

+ 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] Formula to calculate required month
    By tuhinmmr in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-23-2016, 07:15 AM
  2. Formula to calculate the number of days required
    By SunRay in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-16-2014, 05:49 PM
  3. Advanced formula required please
    By zouraiz in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-12-2013, 07:56 AM
  4. Formula required to calculate next month
    By Snowpear in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2013, 08:13 PM
  5. How to Calculate Interest Formula Required
    By Tantalus in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-11-2013, 07:20 AM
  6. Formula required to calculate priority
    By salafichennai in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-29-2012, 06:24 AM
  7. Formula required to calculate betting odds/returns
    By jonrayworth in forum Excel General
    Replies: 0
    Last Post: 07-13-2010, 08:14 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