Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > PC based Database Applications > Microsoft Excel > Index to return Forecasting Date

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-13-08, 00:30
bamma bamma is offline
Registered User
 
Join Date: Sep 2008
Posts: 2
Index to return Forecasting Date

I need to create a formula in a single cell without further cells being
used for calculations.

I'm trying to return the date when my Available stock will run out based on a fortnightly forecast.

A B C D E F G
1 CODE Cover Avail 1-Sep 15-Sep 29-Sep 13-Oct
2 NET001 1/09/2008 64000 36000 0 0 48000

I put the formula in B2. Which attempts to return the date from the 1st row.

Using =INDEX(D1:G1,MATCH(C2,D2:G2,1)) gets me the result 13-Oct.

Problem then is that once I start included the rest of the forecast numbers
the MATCH only looks for the closing matching number.

Eg:
H1 = 27-Oct
H2 = 144,000
I1 = 10-Nov
I2 = 96,000

Change the Avail Number (C2) to 150,000

Using =INDEX(D1:I1,MATCH(C2,D2:I2,1)) gets me the result 10-Nov.
which is wrong - It should return 27-Oct because it is within that period
that my stock will run out.

Any suggestions?
Thanks.
Reply With Quote
  #2 (permalink)  
Old 09-22-08, 13:30
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Posts: 82
You can't achieve this with Excel without making some preetty radical changes.

The MATCH function is working perfectly according to the Help file - according to the arguments supplied, it's looking for the largest value in lookup_array that is less than or equal to lookup_value. It does not perform any comparisons or other functions on the values within lookup_array.

I've managed to get the right answer (according to what you need) on the attached spreadsheet, by doing the following:
  • Reversing the order of the dates and their forecast quantities
  • Adding a row of calculated cells to get the running forecast (please note the semi-anchored formula)
  • Changing the match_type arguement to -1

Hope this helps!
Attached Files
File Type: zip dbForum1080922.zip (4.1 KB, 13 views)
Reply With Quote
  #3 (permalink)  
Old 09-22-08, 22:35
bamma bamma is offline
Registered User
 
Join Date: Sep 2008
Posts: 2
Index to return Forecasting Date

Thanks for your reply.

I did get an answer for it eventually.

Where $AM$3:$AY$3 contains my fortnightly forecast dates

Where $AM4:$AY4 contains my fortnightly forecast qty's

And $H4 is my available Stock.

{=INDEX($AM$3:$AY$3,MATCH(TRUE,SUBTOTAL(9,OFFSET($ AM4:$AY4,,,,COLUMN($AM4:$AY4)-MIN(COLUMN($AM4:$AY4))+1))>$H4,0))}

Ctrl + Shift + Enter (Array)

It works well.

Cheers,

Bam.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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