Dates and look ups?

jackdiamond

Board Regular
Joined
Oct 10, 2007
Messages
220
Hi All,

I am hoping to look up some data from another worksheet which changes as today's date changes.

So for example, if it is June, I want it to look up the data that shows for June. If it is July today, I want it to look up the data only from July in my spreadsheet etc etc.

This is my current formula =VLOOKUP(D5,$B$25:$C$39,2,FALSE). This is before I wanted it to show the same month as we are currently in

Any help would be much appreciated

Ta
Jack
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Is your June data in a single cell? Or, are there a range of cells with values for June (and you essentially want to pull everything from June)?

If it's the former, try:
=vlookup(month(today()),$b$25....)

Depending on how your dates are formatted, maybe:
=vlookup(text(today(),"mmm"),$b$25...)

With sample data, we could give a more accurate formula.
 
Upvote 0
The June data is in a single cell.

Basically, I collate a list of data in one worksheet that has month in one column, then the numbers in the next column.

My boss only wants to see the numbers for the relevant month which will be viewed on a seperate worksheet.

Does this make sense?
 
Upvote 0
Not sure if Jun-12 is text or just formatting,but if is formatting try this:

Sheet4


*ABCDEF
1datedata***June
202-May29**39
302-May78***54
404-May52***85
505-May7****
605-May77****
706-May57****
807-May87****
908-May98****
1009-May56****
1110-May4****
1211-May73****
1312-May4****
1413-May7****
1514-May80****
1615-May99****
1716-May84****
1817-May46****
1918-May86****
2019-May71****
2120-May39****
2221-May27****
2322-May60****
2423-May67****
2524-May41****
2625-May80****
2726-May18****
2827-May4****
2928-May2****
3029-May42****
3130-May45****
3231-May31****
3301-Jun9****
3402-Jun54****
3503-Jun85****

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:93px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
F1=TODAY()
E2=SUMPRODUCT(--(MONTH($A$2:$A$35)=MONTH(TODAY())))
F2{=IF(ROWS($F$2:F2)<=$E$2,INDEX(B$2:B$35,SMALL(IF(MONTH($A$2:$A$35)=MONTH(TODAY()),ROW($A$2:$A$35)-ROW($E$2)+1),ROWS($F$2:F2))),"")}
F3{=IF(ROWS($F$2:F3)<=$E$2,INDEX(B$2:B$35,SMALL(IF(MONTH($A$2:$A$35)=MONTH(TODAY()),ROW($A$2:$A$35)-ROW($E$2)+1),ROWS($F$2:F3))),"")}
F4{=IF(ROWS($F$2:F4)<=$E$2,INDEX(B$2:B$35,SMALL(IF(MONTH($A$2:$A$35)=MONTH(TODAY()),ROW($A$2:$A$35)-ROW($E$2)+1),ROWS($F$2:F4))),"")}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
You could add another column and make it a month only column, or use index(match())

=index($b$25:$c:$39,match(month(today()),month($b$25:$b$39),0),2)

Try that, if it gives you an error then try it as an array (hit ctrl+shift+enter)

NOTE*** Today() is only in excel 2007 or 2010
 
Upvote 0
C D
Jun-12 10
May-12 3
Apr-12 3
Mar-12 2
Feb-12 0
Jan-12 4
Dec-11 0
Nov-11 6
Oct-11 4
Sep-11 2
Aug-11 2
Jul-11 1
Jun-11 2
May-11 0
Mar-11 5
Feb-11 5

This is what I have. Is there an easy way to do what I want? That previous post has confused the hell out of me ;o)
 
Upvote 0
ok, this returns data as long as it is an exact date but I want it to look up any date in the current month?

=VLOOKUP(A1,D4:E19,2,FALSE)
 
Upvote 0

Forum statistics

Threads
1,219,162
Messages
6,146,661
Members
450,706
Latest member
LGVBPP

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top