Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 373
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 373
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 373
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vertical Lookup from a List B Golden Excel Worksheet Functions 5 July 20th 06 02:45 PM
List all contracts that relate to a single part number Ashley Morris Excel Discussion (Misc queries) 2 May 16th 06 04:21 AM
return a range of cells from a vertical lookup vickyb_au Excel Worksheet Functions 2 October 11th 05 11:15 AM
How to return a dollar value for a part number entered in a cell free2bjmg Excel Worksheet Functions 3 July 24th 05 01:26 AM
Part Number Lookup Marshall2 Excel Worksheet Functions 2 July 11th 05 08:58 AM


All times are GMT +1. The time now is 12:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"