index date range

oddworld

Active Member
Joined
May 31, 2005
Messages
250
hi all i currently have the following data on sheet2


Date Unit Rank Name --- 9 columns all up
01/01/05 xxx xx xxxxx

on sheet 1 i have the following

A1 = Mar
a2 = =COUNTIF(Sheet2!A1:A8,A1)
a4 = =IF(N($K4),INDEX(Sheet2!A$2:A$9,$K4),"") 0ut to j4

My problem is that to get this to work i have to change the dates in sheet2 to text fields ie "mar".
How can put "mar" in a1 and it will check on sheet though all the dates that are formated like 01/03/05 etc

any ideas would be appreciated
cheers
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
If it's always 1st of the month you could put 01/03/05 in A1 and format it as mmm.

With a text entry in A1, A2 could be:

=SUMPRODUCT(--(TEXT(Sheet2!A1:A4,"mmm")=A1))
 
Upvote 0
re

Thanks Andrew, but the dates are recorded as different days ie they could be 01/03/05 through to 31/03/05
 
Upvote 0
re

the sumproduct works for the first date ie 01/03/05 however does not count other dates within mar.
 
Upvote 0

Forum statistics

Threads
1,223,395
Messages
6,171,845
Members
452,427
Latest member
samk379

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