Forum Discussion

Colinahn's avatar
Colinahn
Copper Contributor
Dec 17, 2020

I really need a help with a formula!

Hi,

I've been simply copying and pasting the value of date from sheet 1 (highlighted in green) to sheet 2 (highlighted in yellow) whenever the value of qty shifts to a different date.

What I want to do is to look up the value of code and qty in sheet 2 and find the value of the date

(Cell B2:B9) in sheet 2 from sheet 1.

 

Sheet 1 

 

Sheet 2

 

The problem is that qty. data in sheet 1 often moves to a different date (sometimes they get to ship out early and vice versa). Therefore, I need to copy and paste whenever it moves to a different date.

Please help me if there is any better way rather than just copying and pasting it every time.

Thank you!

7 Replies

  • mathetes's avatar
    mathetes
    Silver Contributor

    Colinahn 

     

    I'm certain there's a better way.

     

    But the best way (I strongly suspect) is likely to involve a redesign of the whole layout, probably separating the collection of data (the Input) from the Output.

     

    Is it possible to post not just images but the actual Excel workbook? If it contains confidential or proprietary data, then post something without that confidential info, but as much of the rest as possible.

     

    And could you say more about the "big picture" here....what are you tracking, how is Sheet 1 updated, how frequently does it change, do you need to track history or just the most recent status, etc?

     

    Excel is really good with taking detailed "raw data" and extracting from it summary data, daily or weekly reports, etc. That is to say, the kind of things you appear to be doing "manually" in the form of copy and paste. There are formulas or functions for that. But they work better still if the underlying data is well designed for that purpose.

    • Colinahn's avatar
      Colinahn
      Copper Contributor

      mathetes 

      Hi,

      Thanks for the reply.

       

      Would be difficult to use without changing the layout of data?

       

      Sheet 1 is updated based on other raw data. The cell highlighted in green refers to the shipping date and doesn't change. But, let's say Cell B4 shifts to C4. Then I need to fix the date in sheet 2. It frequently changes (every month) because of supply status. I don't need to track history but need to keep updating whenever the shipping date of the order shifts to different date.

       

      • mtarler's avatar
        mtarler
        Silver Contributor

        Colinahn   I agree with mathetes that there are still some questions and that it would be much more helpful if you uploaded a sample sheet.  My interpretation of the info is that the invoice numbers are A001 for the first invoice for product A1 and then A002, A003, ... for that product and similar for B1, C1, and D1, but what if you have product A2?  I also have same question about dates as mathletes since the dates shown on sheet 2 don't line up with dates on sheet 1.  That said based on what I believe you ASKED for, here is an equation that will work:

        =INDEX(FILTER(Sheet1!$B$3:$G$3,INDEX(Sheet1!$B$4:$G$7,MATCH(C2,Sheet1!$A$4:$A$7,0),0)>0),COUNTIF($C$2:C2,C2))

        you could even use a variation of this equation (or a more simplified lookup based on this date) to get the corresponding QTY just in case that might change on occasion.

         

Resources