Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Find closest date or matching

I am having trouble finding a solution to the following;

I have a dates located in the G column on a worksheet named JobSheet,
from another worksheet (Sales Order) I am copying a date from a cell
then need to find the a date on the JobSheet that matches the Sales
order date or the closest one to it. If it finds a matching date I
need to go to the last entry with that date and compare a second field
in that row with a variable on the Sales Order. If the date cannot be
matched I just need to find the closest date prior to the one on the
Sales Order and go to the end of that date range. I cannot use
VLOOKUP to find these values since my dates are in the right most
column of the worksheet and cannot be changed.

I have most of this coded, variables and outside routines, I just need
a method of searching < or = the date specified on the Sales Order.

Any input is much appreciated.

Thanks,

Chad

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Find closest date or matching

using a combination of Index and Match will give you the same functionality
of Vlookup without the limitation of looking in the leftmost column

Index(columnN,Match(value,columnT,1),1)

as a "pseudo code" example. See the help on Match for details on its
behavior and requirements for inexact matches.

--
Regards,
Tom Ogilvy


" wrote:

I am having trouble finding a solution to the following;

I have a dates located in the G column on a worksheet named JobSheet,
from another worksheet (Sales Order) I am copying a date from a cell
then need to find the a date on the JobSheet that matches the Sales
order date or the closest one to it. If it finds a matching date I
need to go to the last entry with that date and compare a second field
in that row with a variable on the Sales Order. If the date cannot be
matched I just need to find the closest date prior to the one on the
Sales Order and go to the end of that date range. I cannot use
VLOOKUP to find these values since my dates are in the right most
column of the worksheet and cannot be changed.

I have most of this coded, variables and outside routines, I just need
a method of searching < or = the date specified on the Sales Order.

Any input is much appreciated.

Thanks,

Chad


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Find closest date or matching

Tom,

Which is faster, vlookup or the Index Match combo?

"Tom Ogilvy" wrote in message
...
using a combination of Index and Match will give you the same
functionality
of Vlookup without the limitation of looking in the leftmost column

Index(columnN,Match(value,columnT,1),1)

as a "pseudo code" example. See the help on Match for details on its
behavior and requirements for inexact matches.

--
Regards,
Tom Ogilvy


" wrote:

I am having trouble finding a solution to the following;

I have a dates located in the G column on a worksheet named JobSheet,
from another worksheet (Sales Order) I am copying a date from a cell
then need to find the a date on the JobSheet that matches the Sales
order date or the closest one to it. If it finds a matching date I
need to go to the last entry with that date and compare a second field
in that row with a variable on the Sales Order. If the date cannot be
matched I just need to find the closest date prior to the one on the
Sales Order and go to the end of that date range. I cannot use
VLOOKUP to find these values since my dates are in the right most
column of the worksheet and cannot be changed.

I have most of this coded, variables and outside routines, I just need
a method of searching < or = the date specified on the Sales Order.

Any input is much appreciated.

Thanks,

Chad




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Find closest date or matching

http://www.decisionmodels.com

would have information like that.

--
Regards,
Tom Ogilvy


"Dave" wrote:

Tom,

Which is faster, vlookup or the Index Match combo?

"Tom Ogilvy" wrote in message
...
using a combination of Index and Match will give you the same
functionality
of Vlookup without the limitation of looking in the leftmost column

Index(columnN,Match(value,columnT,1),1)

as a "pseudo code" example. See the help on Match for details on its
behavior and requirements for inexact matches.

--
Regards,
Tom Ogilvy


" wrote:

I am having trouble finding a solution to the following;

I have a dates located in the G column on a worksheet named JobSheet,
from another worksheet (Sales Order) I am copying a date from a cell
then need to find the a date on the JobSheet that matches the Sales
order date or the closest one to it. If it finds a matching date I
need to go to the last entry with that date and compare a second field
in that row with a variable on the Sales Order. If the date cannot be
matched I just need to find the closest date prior to the one on the
Sales Order and go to the end of that date range. I cannot use
VLOOKUP to find these values since my dates are in the right most
column of the worksheet and cannot be changed.

I have most of this coded, variables and outside routines, I just need
a method of searching < or = the date specified on the Sales Order.

Any input is much appreciated.

Thanks,

Chad





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
Formula to find the date closest to today. jem264 Excel Discussion (Misc queries) 3 February 26th 10 06:27 PM
Find matching date in another worksheet, copy and paste data Shoney Excel Discussion (Misc queries) 1 November 8th 07 11:45 PM
Array Lookup to Find Closest Date and Next Closest Date [email protected] Excel Worksheet Functions 7 November 7th 07 03:04 AM
Find closest future date from list ... Ray Excel Discussion (Misc queries) 3 September 20th 07 07:43 PM
Macro to find matching date and copy values to another sheet Tiger Excel Discussion (Misc queries) 3 August 13th 07 01:45 PM


All times are GMT +1. The time now is 06:24 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"