I’m pretty new to Excel, that question is probably easy, but I dont know what to do :-(.
So this is what I have:
Date Numbers
01.09.11 10
01.10.11 20
01.11.11 30
01.12.11 40
Now what I want is in another cell: Get the number of the date, where the date’s month is the current month. How do I do this?
Assuming all your dates are strings of the form “dd.mm.yy”, you can use the following array formula:
where the 9 is the month number you want to look up. Enter this as an array formula by pressing Ctrl+Shift+Enter.
EDIT:
As pointed out in the comments, you want to match the current month, so incorporating @JMax’s suggestion works:
To clear up any confusion,
MID()returns a string, which by itself will not return a match for the number value returned byMONTH(TODAY()). However, if you stick theMID()function inside aVALUE()function, the string returned byMID()will be converted into a number value. E.g., “09” becomes the number 9, “10” becomes the number 10. This allows you to match the number value returned byMONTH(TODAY()).However, if your dates are entered as dates with format dd.mm.yy in your sheet instead of as strings, then you can use the same strategy but with a different matching term:
Enter this as an array formula.