View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Minitman[_4_] Minitman[_4_] is offline
external usenet poster
 
Posts: 273
Default Finding The Right Row To Do A VLOOKUP

Hey Tom,

Thanks for the tutorial.

This is what I was looking for.

The first time you mentioned DAY was referenced to Monday, I
needed it to also reference the first of the month since there was no
data before the first of the month. I had to look into how it worked
before I could make it work for me. It is not knowing how commands
work that make them unusable and your examples show me just how
usable they are and after digging enough to understand them. I can
then modify them and make them work for me. I thank you for taking
the time and putting up with my ignorance until the light came on.

-Minitman


On Mon, 31 Oct 2005 08:53:05 -0500, "Tom Ogilvy"
wrote:

I would suggest a similar approach. You would have to figure out how to
calculate the location.

Be aware that Excel dates are pretty flexible

=DATE(YEAR(TODAY()),MONTH(TODAY()),-5)

done on Oct 31, 2005, returns Sept 25, 2005.

=DATE(YEAR(TODAY()),MONTH(TODAY()),0)
gives you the date of the last day of the previous month.

=DATE(YEAR(TODAY()),MONTH(TODAY())+1,0)
gives you the date of the last day of this month
=DATE(YEAR(TODAY()),MONTH(TODAY())+2,0)
gives you the date of the last day of the next month
=DATE(YEAR(TODAY()),MONTH(TODAY())+1,1)
gives the date of the first day of the next month

If you enclose any of these in the Day function

=Day( - date formula -)

then you get the numerical day number. You should be able to use
information like this to figure out where to get your data.

I found the DAY command.

I am glad you found the day function. Remember this several posts back:
(day(date of monday)-1)*42+2