View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Hide row based on cell value

Here's one easy, effective play using a helper col & autofilter ..

Insert a new helper col D, if necessary, next to the dates col C (dates in
col C are presumed real dates recognized by Excel)

Put in D2:
=IF(ISTEXT(C2),"",IF(C2=DATE(YEAR(TODAY())-4,MONTH(TODAY()),DAY(TODAY())),"x",""))
Copy D2 down to cover the max expected extent of data in col C. Col D flags
directly the results that you're after ("x"), ie where the dates in col C are
NOT older than 4 years (the other way around to look at it)

Anytime that you want to exclude/hide dates in col C older than 4 years ..
Just apply autofilter on col D, choose: x
and that's your baby (the filtered results) !

Aloha? Celebrate it here, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:300 Subscribers:70
xdemechanik
---
"Munchkin" wrote:
Colum C shows a date. If the date shown is older than 4 years I want the row
to be hidden.

Is it possible to do this?