+ Reply to Thread
Results 1 to 14 of 14

Formula to lookup latest revision but data entered prior to current revision should not ch

  1. #1
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Formula to lookup latest revision but data entered prior to current revision should not ch

    I have two sheets:
    1) Item database sheet: in this sheet , I maintain all information related to particular items viz. price,description, drawing no., drawing revision no. & revision applicable date etc.
    Items are identified by their item codes
    2) Po entry sheet:Here i enter po no. item code of item for which po is received, drawing revision mentioned in po etc. Based on the item code data is retreived from item database sheet.

    Refer attached file for the layout of two types of sheets mentioned above.
    For simplicity, I've removed irrelevant entries.I've also shown the output needed.

    Drawings keep on revising.Therefore I've created multiple coloumns for revision data entry in item database sheet & their date of arrival.
    Question is, that in PO entry sheet, based on item code, latest revision should be extracted onto the PO entry sheet revision coloumn AND the data which was extracted before the arrival of the new revision, should not be recalculated or disturbed. Old record should keep on maintainig the revision no. that was latest/valid on that particular date of po.
    Attached Files Attached Files

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

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    How do the dates in the second table relate to the dates in the first?
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    Try this in K3 and fill down

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    Dates in the table2 are dates on which purchase order is received for that particular item code.

    Dates in Table1 are the dates on which drawing was revised for that particular item.

    Three columns marked rev-A,rev-B,rev-C & their associated date columns were created to fill data as one drawing can have multiple revisions
    & different date for each revision.

    For any new entry in Table2 for a new po should fetch the latest applicable revision for that item & places in 3rd column of table 2.

    To get the latest revision for an item, i created a helper coumn in table1 which contained the latest applicable revision
    for that item code by using lookup function & then used index-match to get it in table2, column3.
    Problem is that when a new revision comes for an item & lookup extracts the same, then all the records of this item in Table2
    get updated even if their po date is prior to the arrival date of the latest revision date.

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

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    Did you see the suggestion offered in post #3?

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    With a large itemcode database my suggestion in post #3 might be slow to calculate, if it is, this one may be faster.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    Hello Jason, thanks for the reply.
    I've tried the formula offered by you, it is working ok.
    Thank you very much.
    In case I face any problem, I'll revert.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  9. #9
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    Hi Jason, thanks for your prompt reply. Both solutions are working ok. I had few queries regarding limitations of each solution & can we overcome them:
    A) Solution-1 =AGGREGATE(14,4,($A$3:$A$5=$I3)*($E$3:$G$5<>"")*($E$3:$G$5<$J3)*$B$3:$D$5,1)
    A1) One of the arguments in the formula being used is that we are checking if any cell in the range $E$3:$G$5<>"", in these cells I've applied a formula that as soon as there is an entry in cell range B3: D5, a time stamp is created in E3: G5. I believe this will not be treated as blank by our formula.

    B) Solution-2 =MATCH($J3,INDEX($E:$G,MATCH($I3,$A:$A,0),0))-1
    B1) One of the key components in working of this formula is that the cell contents in the range B3: D5 are sequential numbers starting from zero. If these are alphabets or any other string, then how can we extract them?

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    With solution 1, if you have a formula that shows either a timestamp, or "" then it should work fine, however it will only show a numeric result. Strings will not be extracted.

    With solution 2,

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Should extract any format.

  11. #11
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Re: Formula to lookup latest price/price basis without affecting prior date data

    Just to clarify my questions in the last post, I've attached one file.
    How can we solve it with a formula?
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    Adding another criteria to the aggregate array should do it.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Approximately how many rows of data will you have in each sheet of your real workbook?

  13. #13
    Registered User
    Join Date
    10-02-2018
    Location
    Yamunanagar,India
    MS-Off Ver
    2010
    Posts
    35

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    Table-1 will eventually have say 5k rows. Table-2 far more than that considering repeat po.

  14. #14
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to lookup latest revision but data entered prior to current revision should no

    In that case, if calculation is slow, then this might help to speed it up.

    In P3 and filled down to create a reference to the database row that the item code matches. Adjust the refernce to $A$5000 so that it is adequate for the size of the database.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then to get the applicable price
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This method means that the array is only processing the 1 row in the database where the item matches, not all 5k rows.

+ 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. Revision in existing Nested if AND OR formula
    By paradise2sr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-12-2018, 01:48 AM
  2. need revision of the formula please
    By Darkprophecy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-03-2018, 02:44 AM
  3. [SOLVED] Opening latest revision of a file via URL(http://..)
    By plasmas222 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2015, 03:17 PM
  4. Data Analysis: Compare initial date with final date by looking up the latest revision
    By White_Glint in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2015, 02:31 PM
  5. [SOLVED] Count formula revision
    By krazyhype19 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-01-2014, 12:31 AM
  6. Pivot Table Count & Sum latest revision from the Database
    By rickyilas in forum Excel General
    Replies: 2
    Last Post: 02-24-2010, 08:25 AM
  7. Drawing register latest revision letters
    By Racing Ka in forum Excel General
    Replies: 6
    Last Post: 09-05-2007, 04:01 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