+ Reply to Thread
Results 1 to 11 of 11

Help with some combination of IF, Match functions

  1. #1
    Registered User
    Join Date
    12-04-2017
    Location
    Virginia
    MS-Off Ver
    2010
    Posts
    5

    Help with some combination of IF, Match functions

    Greetings,

    I know the answer to this will probably be simple. But I hope you all wont mind taking the time to help. I have two tables. The first contains 8 columns of numbers..in somewhat sequential order. There are "chunks" of sequential numbers missing at random points. Here is a portion of it. Capture.JPG

    The other is a table with more detailed information. Capture2.JPG

    I want to write a formula in B2 of the "sheet 2" that will see if A1 is in one of the 4 columns of "Inventory 2015" or one of the 4 columns of "Inventory 2016" in "sheet 1" that would than return "2015" or "2016" depending on which one of the 2 larger columns that number is in.

    Hope this is clear. Thanks for nay help in advance.

  2. #2
    Registered User
    Join Date
    11-16-2017
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    9

    Re: Help with some combination of IF, Match functions

    Can you attach your spreadsheet?
    Last edited by MSExcelLnr; 12-04-2017 at 06:16 PM.

  3. #3
    Registered User
    Join Date
    12-04-2017
    Location
    Virginia
    MS-Off Ver
    2010
    Posts
    5

    Re: Help with some combination of IF, Match functions

    I would rather not because some of the data is sensitive/personal information. That's why I posted screenshots of the relevant and harmless data.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Help with some combination of IF, Match functions

    Nobody is going to type in your data so remove/disguise any sensitive data.

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

    Re: Help with some combination of IF, Match functions

    Remove the sensitive data & Personal Information and attach a sample file
    Samba

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

  6. #6
    Registered User
    Join Date
    12-04-2017
    Location
    Virginia
    MS-Off Ver
    2010
    Posts
    5

    Re: Help with some combination of IF, Match functions

    I am not sure I am willing to go through the hassle of removing all the sensitve data. Thanks anyways!

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

    Re: Help with some combination of IF, Match functions

    Quote Originally Posted by sal4m4nd3r View Post
    I am not sure I am willing to go through the hassle of removing all the sensitve data. Thanks anyways!
    we are here to help/learn but not to work for you, may I know what you understand?

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Help with some combination of IF, Match functions

    How long would it take to cut & paste the 15 rows in your images to the 2 sheets? We don't need more data than this providing it illustrates what is required.

    Any columns not required can be left blank

  9. #9
    Registered User
    Join Date
    12-04-2017
    Location
    Virginia
    MS-Off Ver
    2010
    Posts
    5

    Re: Help with some combination of IF, Match functions

    It is attached. I tried nesting If statements and If/match. But nothing seems to work right. A few of them will seemingly work but goto #N/A results a few hundred results in.
    Attached Files Attached Files
    Last edited by sal4m4nd3r; 12-05-2017 at 09:46 AM.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Help with some combination of IF, Match functions

    In B2

    =IF(SUMPRODUCT((Sheet2!$A$3:$H$2538=Sheet1!$A2)*(COLUMN($A$1:$H$1)))<=4,2015,2016)

    in C2

    =INDEX(Sheet2!$A$2:$H$2,SUMPRODUCT((Sheet2!$A$3:$H$2538=Sheet1!$A2)*(COLUMN($A$1:$H$1))))
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-04-2017
    Location
    Virginia
    MS-Off Ver
    2010
    Posts
    5

    Re: Help with some combination of IF, Match functions

    I think I actually got it! Figures after several hours, I post on the forum.. get a night sleep and come back and get it! I'm sure it is not the most efficient..but I tired nesting If/countif statements. The trouble I was having is a fundamental misunderstanding of the match and index functions.

    =IF(COUNTIF('Inventory Zones'!A:D,'Full inventory'!A2),"2015",IF(COUNTIF('Inventory Zones'!E:H,'Full inventory'!A2),"2016","n/a"))

    The difficulty is that some of TreeIDs are non sequential. It will be sequential for a few hundred then skip a few thousand.

    Edit: Thanks JohnTopley for your help.
    Last edited by sal4m4nd3r; 12-05-2017 at 10:03 AM.

+ 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. How to use combination of functions
    By ajaypal.sp in forum Excel General
    Replies: 10
    Last Post: 10-28-2015, 04:06 PM
  2. Parsing Text using a combination of functions
    By informaticakid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-20-2014, 01:29 PM
  3. [SOLVED] combination of if, index and match functions not working
    By mingali in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-01-2013, 05:49 PM
  4. [SOLVED] to use a logical function, or combination of log functions... or something else?
    By texcel_tom in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-03-2013, 01:01 PM
  5. How to Apply a combination of Index & Match Functions
    By bmc1975 in forum Excel General
    Replies: 4
    Last Post: 07-30-2010, 07:56 PM
  6. Replies: 3
    Last Post: 02-18-2009, 12:04 PM
  7. combination of functions?
    By vicvega in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-07-2006, 03:45 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