+ Reply to Thread
Results 1 to 4 of 4

Formula Indice /Corresp

  1. #1
    Registered User
    Join Date
    06-17-2020
    Location
    Portugal
    MS-Off Ver
    2019
    Posts
    2

    Formula Indice /Corresp

    Hi everyone!


    I appreciate your help in solving a problem I have. I have an excel sheet for product quantity registration with a cover sheet that gives the totals by per product separated by location.
    To get an idea, the sheet is divided by several warehouses from which we choose first, we choose that location, we insert the date after the quantity and finally we choose the type of product that was placed there.
    I needed to know the last cell entry and the type of product registered in each warehouse. Then, with this data, I would go to the cover sheet that has all the existing warehouses sorted by type of product and I would like the quantity available by type of product / warehouse to be automatically presented.
    I tried using the index function to locate the last filled cell and it worked, but then when I try to group the information, that is, to know the last VTN entry for the SUB 3A warehouse in order to know the existing quantity, I don't know how to complete it.
    Attached data sheet for consultation if you have questions.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Formula Indice /Corresp

    Hello -

    I'm not 100% sure I understand what you want, but I think this is close. On the GRANEL tab, I added the following formula to cell D5:

    =IFERROR(IF(INDEX(INDIRECT("'"&$A5&". "&$B5&"'!$A$5:$E$40"),COUNT(INDIRECT("'"&$A5&". "&$B5&"'!$A$5:$A$40")),5)=D$3,INDEX(INDIRECT("'"&$A5&". "&$B5&"'!$A$5:$E$40"),COUNT(INDIRECT("'"&$A5&". "&$B5&"'!$A$5:$A$40")),4),0),"")

    This formula is not as complicated as it looks.

    Starting with the Green Text: This formula uses INDIRECT to create a text cell range address from your Location Desicriptions on GRANEL tab, Cell A5 and B5. I did this so I can copy the formula down and it will automatically redirect the forumla to each tab in your workbook. I then use INDEX to return the number based on COUNT() which counts the number of cells with numbers in them in the date column of (in this case) Sub. 1A A5:A40. It finds the row of the last entry, and passes that to INDEX.

    The RED text is exactly the same as the Green text EXCEPT it checks to see if the product type is of the last entry on Tab Sub. 1 A and compares it to the product type in Cell D3. If it's the same product type, then show the result of the Green text. If it's NOT the same product type, show 0. This is how I get the products to line up correctly in your table on GRANEL.

    Finally, since many of your tabs are missing (like Tab Sub. 4 A, Sub. 5 A, and so on, I enclosed the whole thing in an IFERROR staement to just show "" is the tab sheet is missing.

    Attached is your spreadsheet with the above formulas copied to the other cells.

    I hope this is what you were looking for.
    Attached Files Attached Files
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  3. #3
    Registered User
    Join Date
    06-17-2020
    Location
    Portugal
    MS-Off Ver
    2019
    Posts
    2

    Re: Formula Indice /Corresp

    Spectacular! That was exactly what I had planned. I managed to do everything and even better than I had planned.
    It had not occurred to me to put all other products at 0 if they were replaced.

    Thank you very much for your help and availability!

  4. #4
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Formula Indice /Corresp

    Great! Glad I was able to help.

+ 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. Finding duplicates in column A and checks column B if corresp value exceed total
    By edsel1979 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2015, 09:01 AM
  2. Match and corresp with multiple criteria - Incompatible type
    By alcalina in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-23-2015, 03:53 PM
  3. Error #N/D in corresp function
    By Birnen in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-27-2014, 09:58 AM
  4. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  5. problem with reccordset: error: "L'indice n'appartient pas a la selection"
    By sebastienkanj in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 05-16-2013, 03:42 AM
  6. [SOLVED] foglio con indice
    By Wallace in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2005, 06:06 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