Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
lookup part number in a vertical list and return the most recent .
I need to lookup a part number in a "shipment Log" worksheet. It is laid out
with the following column headers: "Part Number" "Aug 1" "Aug 2" "Aug 3" etc.... If a part has been shipped, there will be a value under the appropriate date column. This value will be the quantity shipped. I am trying to find the most recent shipment date and return that date into a cell in another spreadsheet. Does anyone have any suggestions? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
lookup part number in a vertical list and return the most recent .
I'll give this a shot. Are the column headings for the shipping date
formatted as text (like Aug 2, Aug 3) or dates (like 2-Aug, 3-Aug) or what? Also, is the sheet with the date columns laid out with the part number in column A, first date in column B, second date in column C, and so on to Aug 31, with no blanks in-between? James "James T" <James wrote in message ... I need to lookup a part number in a "shipment Log" worksheet. It is laid out with the following column headers: "Part Number" "Aug 1" "Aug 2" "Aug 3" etc.... If a part has been shipped, there will be a value under the appropriate date column. This value will be the quantity shipped. I am trying to find the most recent shipment date and return that date into a cell in another spreadsheet. Does anyone have any suggestions? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
lookup part number in a vertical list and return the most rece
The column headings a general format for Column "A" titled "Buyer-Part-#"
with date titles in the next columns in the format of "8/1/2007"....8/31/2007" There are no blank columns in between the dates. Thanks.James "Zone" wrote: I'll give this a shot. Are the column headings for the shipping date formatted as text (like Aug 2, Aug 3) or dates (like 2-Aug, 3-Aug) or what? Also, is the sheet with the date columns laid out with the part number in column A, first date in column B, second date in column C, and so on to Aug 31, with no blanks in-between? James "James T" <James wrote in message ... I need to lookup a part number in a "shipment Log" worksheet. It is laid out with the following column headers: "Part Number" "Aug 1" "Aug 2" "Aug 3" etc.... If a part has been shipped, there will be a value under the appropriate date column. This value will be the quantity shipped. I am trying to find the most recent shipment date and return that date into a cell in another spreadsheet. Does anyone have any suggestions? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
lookup part number in a vertical list and return the most rece
James, this is probably not the most elegant way to do this, but it should
work okay. Copy this code and paste it into a standard module. Assumptions: 1. The ship dates are in Sheet2 (change as needed) 2. BuyerPart# is in column A of Sheet2, and ship dates begin in column B and continue until the end of the month with no spaces between the BuyerPart# and Aug 31. 3. Row 1 of Sheet2 is a heading row, with a non-empty heading cell for the BuyerPart# and for each day. If the part numbers for which you want to get the ship date start in row 2 of column A on the sheet on which you want to get the ship dates, put this in B2 and drag down as far as needed: =getship(A2) Let me know if this works and if you have any questions. Cheers, James Function GetShip(targ) Dim RtCol As Integer, shipCol As Integer, shipRow As Long, c As Range GetShip = "" With Worksheets("Sheet2") RtCol = .Cells(1, 1).End(xlToRight).Column Set c = .Columns(1).Find(targ) If Not c Is Nothing Then shipRow = c.Row shipCol = .Cells(c.Row, "a").End(xlToRight).Column If Not shipCol RtCol Then GetShip = .Cells(1, shipCol) End If End With End Function "James T" wrote in message ... The column headings a general format for Column "A" titled "Buyer-Part-#" with date titles in the next columns in the format of "8/1/2007"....8/31/2007" There are no blank columns in between the dates. Thanks.James "Zone" wrote: I'll give this a shot. Are the column headings for the shipping date formatted as text (like Aug 2, Aug 3) or dates (like 2-Aug, 3-Aug) or what? Also, is the sheet with the date columns laid out with the part number in column A, first date in column B, second date in column C, and so on to Aug 31, with no blanks in-between? James "James T" <James wrote in message ... I need to lookup a part number in a "shipment Log" worksheet. It is laid out with the following column headers: "Part Number" "Aug 1" "Aug 2" "Aug 3" etc.... If a part has been shipped, there will be a value under the appropriate date column. This value will be the quantity shipped. I am trying to find the most recent shipment date and return that date into a cell in another spreadsheet. Does anyone have any suggestions? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
lookup part number in a vertical list and return the most rece
James, I didn't word my assumptions exactly right. What I meant was,
assuming row 1 of the sheet containing the ship dates is a heading row, there must be at least one empty column to the right of the column containing Aug 31. Let me know! James "Zone" wrote in message ... James, this is probably not the most elegant way to do this, but it should work okay. Copy this code and paste it into a standard module. Assumptions: 1. The ship dates are in Sheet2 (change as needed) 2. BuyerPart# is in column A of Sheet2, and ship dates begin in column B and continue until the end of the month with no spaces between the BuyerPart# and Aug 31. 3. Row 1 of Sheet2 is a heading row, with a non-empty heading cell for the BuyerPart# and for each day. If the part numbers for which you want to get the ship date start in row 2 of column A on the sheet on which you want to get the ship dates, put this in B2 and drag down as far as needed: =getship(A2) Let me know if this works and if you have any questions. Cheers, James Function GetShip(targ) Dim RtCol As Integer, shipCol As Integer, shipRow As Long, c As Range GetShip = "" With Worksheets("Sheet2") RtCol = .Cells(1, 1).End(xlToRight).Column Set c = .Columns(1).Find(targ) If Not c Is Nothing Then shipRow = c.Row shipCol = .Cells(c.Row, "a").End(xlToRight).Column If Not shipCol RtCol Then GetShip = .Cells(1, shipCol) End If End With End Function "James T" wrote in message ... The column headings a general format for Column "A" titled "Buyer-Part-#" with date titles in the next columns in the format of "8/1/2007"....8/31/2007" There are no blank columns in between the dates. Thanks.James "Zone" wrote: I'll give this a shot. Are the column headings for the shipping date formatted as text (like Aug 2, Aug 3) or dates (like 2-Aug, 3-Aug) or what? Also, is the sheet with the date columns laid out with the part number in column A, first date in column B, second date in column C, and so on to Aug 31, with no blanks in-between? James "James T" <James wrote in message ... I need to lookup a part number in a "shipment Log" worksheet. It is laid out with the following column headers: "Part Number" "Aug 1" "Aug 2" "Aug 3" etc.... If a part has been shipped, there will be a value under the appropriate date column. This value will be the quantity shipped. I am trying to find the most recent shipment date and return that date into a cell in another spreadsheet. Does anyone have any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vertical Lookup from a List | Excel Worksheet Functions | |||
List all contracts that relate to a single part number | Excel Discussion (Misc queries) | |||
return a range of cells from a vertical lookup | Excel Worksheet Functions | |||
How to return a dollar value for a part number entered in a cell | Excel Worksheet Functions | |||
Part Number Lookup | Excel Worksheet Functions |