Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default Conditional Formatting

I have a column of numbers that represent the year. I have it formatted as a
number. I want to compare that number to the current year. What I did was in
another column I used year(today()) to get the current year. It comes out as
2010 I did a right function to the the 10. I then changed it to a number
format and I am trying to do a conditional formatting to highlight all the
numbers in col a that are 10. It does not work unless I manually type in a
10. Any help will be greatly appreciated

col a
9
10
3

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 703
Default Conditional Formatting

Hi Donna

=YEAR(DATE(A1,1,1))+100

compared against;

Year(Today())

Regards,
Per

On 23 Mar., 01:03, Donna wrote:
I have a column of numbers that represent the year. I have it formatted as a
number. *I want to compare that number to the current year. What I did was in
another column I used year(today()) to get the current year. It comes out as
2010 I did a right function to the the 10. *I then changed it to a number
format and I am trying to do a conditional formatting to highlight all the
numbers in col a that are 10. It does not work unless I manually type in a
10. * Any help will be greatly appreciated

col a * * * * *
9
10
3


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default Conditional Formatting

Hi Jessen,
I guess I have another problem that I need to solve before comparing the
current year. The problem is although I formatted my date column all the
same way dd/mm/yy - when I just look at the date, its correct. But when I
click on some they will have yyyy and when I do the right function the year
becomes 4001. So I cant compare the year with the current year. A little
better explanation may by I have a column with dates and other test that I
have pulled out just the dates into a separate column. Some of the dates may
have 07/14/09 and some may just have 7/14/09. What I want to do is pull out
the year, 09 and compare it to the current year 10. I am very flustered with
myself, I know there is just something I must be doing wrong.


"Per Jessen" wrote:

Hi Donna

=YEAR(DATE(A1,1,1))+100

compared against;

Year(Today())

Regards,
Per

On 23 Mar., 01:03, Donna wrote:
I have a column of numbers that represent the year. I have it formatted as a
number. I want to compare that number to the current year. What I did was in
another column I used year(today()) to get the current year. It comes out as
2010 I did a right function to the the 10. I then changed it to a number
format and I am trying to do a conditional formatting to highlight all the
numbers in col a that are 10. It does not work unless I manually type in a
10. Any help will be greatly appreciated

col a
9
10
3


.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 703
Default Conditional Formatting

Donna,

If you dates are 'true dates', you can use the Year function to
extract the year from the date:

=Year("07/14/09") will equal to 2009, which can be compared against
=Year(Today())

Using the Right function on a true date value, will not yield the
expected result.

Hopes this helps.
....
Per



On 23 Mar., 03:07, Donna wrote:
Hi Jessen,
I guess I have another problem that I need to solve before comparing the
current year. *The problem is although I formatted my date column *all the
same way dd/mm/yy - when I just look at the date, its correct. But when I
click on some they will have yyyy and when I do the right function the year
becomes 4001. So I can’t compare the year with the current year. *A little
better explanation may by I have a column with dates and other test that I
have pulled out just the dates into a separate column. *Some of the dates may
have 07/14/09 and some may just have 7/14/09. *What I want to do is pull out
the year, 09 and compare it to the current year 10. *I am very flustered with
myself, I know there is just something I must be doing wrong. *



"Per Jessen" wrote:
Hi Donna


=YEAR(DATE(A1,1,1))+100


compared against;


Year(Today())


Regards,
Per


On 23 Mar., 01:03, Donna wrote:
I have a column of numbers that represent the year. I have it formatted as a
number. *I want to compare that number to the current year. What I did was in
another column I used year(today()) to get the current year. It comes out as
2010 I did a right function to the the 10. *I then changed it to a number
format and I am trying to do a conditional formatting to highlight all the
numbers in col a that are 10. It does not work unless I manually type in a
10. * Any help will be greatly appreciated


col a * * * * *
9
10
3


.- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Conditional Formatting

If you have used year(today()) to get 2010, right(...) will give a *text*
value of "10". If you want the *number* 10, try --right(...) or
right(...)*1 or (right...)+0.
--
David Biddulph


"Donna" wrote in message
...
I have a column of numbers that represent the year. I have it formatted as
a
number. I want to compare that number to the current year. What I did was
in
another column I used year(today()) to get the current year. It comes out
as
2010 I did a right function to the the 10. I then changed it to a number
format and I am trying to do a conditional formatting to highlight all the
numbers in col a that are 10. It does not work unless I manually type in a
10. Any help will be greatly appreciated

col a
9
10
3


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
Conditional formatting--different formatting depending on cell con Tammy S. Excel Discussion (Misc queries) 3 March 30th 09 08:11 PM
Formatting Conditional Formatting Icon Sets The Rook[_2_] Excel Discussion (Misc queries) 3 March 7th 09 08:48 PM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 08:10 PM.

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"