Passing a value in VBA using an offset

I have code that executes when I double click on a cell.  The code
inserts the data validation source into a combobox to ease the input
choice.  It refers to the cell I double clicked as "target"

I want to add a new feature.  Before anything else happens, I want to
filter the data validation source (many of the entries are for dates
that don't apply.  the cell above "target" has a date.  I want to copy
the month of that date into a fixed cell ("A1") and then use that date
in an advanced filter on the data validation source.  Hope you're with
me so far.

The part I can't figure out is how to use the offset function to
calculate the month from the date in the cell above (the rest of the
code I stole :) and is easy).

thanks

0
rdillon (14)
2/24/2005 5:55:46 PM
excel 39879 articles. 2 followers. Follow

1 Replies
586 Views

Similar Articles

[PageSpeed] 5

    Month(Target.Offset(-1,0).Value)

is what I think you mean

-- 

HTH

RP
(remove nothere from the email address if mailing direct)


"Roscoe" <rdillon@mtsi-va.com> wrote in message
news:1109267746.521624.122960@f14g2000cwb.googlegroups.com...
> I have code that executes when I double click on a cell.  The code
> inserts the data validation source into a combobox to ease the input
> choice.  It refers to the cell I double clicked as "target"
>
> I want to add a new feature.  Before anything else happens, I want to
> filter the data validation source (many of the entries are for dates
> that don't apply.  the cell above "target" has a date.  I want to copy
> the month of that date into a fixed cell ("A1") and then use that date
> in an advanced filter on the data validation source.  Hope you're with
> me so far.
>
> The part I can't figure out is how to use the offset function to
> calculate the month from the date in the cell above (the rest of the
> code I stole :) and is easy).
>
> thanks
>


0
bob.phillips1 (6510)
2/24/2005 6:42:45 PM
Reply:

Similar Artilces: