Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Member
 
Posts: 54
Default Even or Odd Year Function

I am trying to use the Year Function =Year(A1). If A1 is actually a vlookup when I place the fubction in cell B1 it works fine. However if I place =Year(vlookup(C1,Table,3,false)) in cell A1 it no longer works correctly. Any ideas or suggestions. I am trying to come up with a formula that determines whether the year of a date is odd or even.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Even or Odd Year Function

Your formula worked okay for me. What exaclty is displayed in A1 when you
enter your formula? Only thing I can suggest is to make sure the formula is
written correctly, and that it's correctly returning a serial (date).

for your end goal, I would suggest using ISEVEN or ISODD. Both of these are
included in the Analysis ToolPak add-in.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dave H" wrote:


I am trying to use the Year Function =Year(A1). If A1 is actually a
vlookup when I place the fubction in cell B1 it works fine. However if
I place =Year(vlookup(C1,Table,3,false)) in cell A1 it no longer works
correctly. Any ideas or suggestions. I am trying to come up with a
formula that determines whether the year of a date is odd or even.




--
Dave H

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 225
Default Even or Odd Year Function

What is the format of the cell being returned by VLOOKUP...

When you put the VLOOKUP in A1 and do =YEAR(A1), Year gets the value as
formatted by A1...
In =YEAR(VLOOKUP...) you it gets the value as returned by VLOOKUP...

If you have a date in A1 you can get wheter year is even or odd by using the
formula
=IF(MOD(YEAR(A1),2)=0,"Even","Odd")

"Dave H" wrote:


I am trying to use the Year Function =Year(A1). If A1 is actually a
vlookup when I place the fubction in cell B1 it works fine. However if
I place =Year(vlookup(C1,Table,3,false)) in cell A1 it no longer works
correctly. Any ideas or suggestions. I am trying to come up with a
formula that determines whether the year of a date is odd or even.




--
Dave H

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Even or Odd Year Function

On Mar 16, 1:40*pm, Dave H wrote:
I am trying to use the Year Function =Year(A1). *If A1 is actually a
vlookup when I place the fubction in cell B1 it works fine. *However if
I place =Year(vlookup(C1,Table,3,false)) in cell A1 it no longer works
correctly. *Any ideas or suggestions. * I am trying to come up with a
formula that determines whether the year of a date is odd or even.

--
Dave H


Dave --

Here is the Even -or- Odd part ...

ISEVEN(YEAR(A1))

-or-

ISODD(YEAR(A1))

Now - this does work if you substitute a VLOOKUP for the range
reference "A1"

-- you can do it all together - something like this ...

ISEVEN(YEAR(VLOOKUP("My Criteria",A1:B2,2,FALSE)))

-or-

ISODD(YEAR(VLOOKUP("My Criteria",A1:B2,2,FALSE)))

... tested it for you over here - this will work for sure

Hope it helps you !

- Rodney POWELL
Microsoft MVP - Excel

www.BeyondTechnology.com



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I crate a function for week of year + year in same cell. patty ann Excel Worksheet Functions 1 March 16th 08 06:34 PM
How to use year function? Biff Excel Discussion (Misc queries) 0 November 30th 06 07:21 AM
How to use year function? Eric Excel Discussion (Misc queries) 0 November 30th 06 06:04 AM
How to use year function? Eric Excel Discussion (Misc queries) 0 November 30th 06 03:51 AM
Datevlaue function/ day/month/year function Nav Excel Worksheet Functions 7 January 23rd 06 02:31 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"