LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 367
Default Macro to automatically hide rows based on 3 cells

I'm new to vba and have almost no clue how to to work with it, but after
searching several sites, I realize it is most like my best solution. If
anyone can help me that would be great.

The sheet I'm working with is tabbed "Today's Staff" Thought once this works
it will be replicated to reflect each day in the month...that's 37 times. So
this auto hide needs to be workbook associated and not sheet specific.


This sheet pulls alpha code from 4 other tabs (sheets) that are monthly
schedules for different staff groups. This is an IF statement with a HLOOKUP
in it, column AJ. This look up is based on merged cell I3 (a given date)

example: cell AJ7
=IF(HLOOKUP($I$3,'RN-I'!$A$3:$AN$32,AL7,
FALSE)=0,"",HLOOKUP($I$3,'RN-I'!$A$3:$AN$32,AL7, FALSE))

Columns J,K; P,Q; V,W run IF statements that decipher the the letter code
pulled from the monthly schedule into AJ

example: cell J7
=IF($AJ$7="A","–ˆ",IF($AJ$7="B","–ˆ",IF($AJ$7="D ","–ˆ",IF($AI$7="M","–ˆ",IF($AI$7="G","–ˆ","")) )))

Then if there is a "–ˆ" in columns J,K; P,Q; V,W the the matching column I,
O, & U will display the employee name pulled from the month schedule tabs.
again I used IF statements

example: cell I7
=IF('RN-I'!B5="", "",IF(J7="–ˆ",'RN-I'!B5,IF(K7="–ˆ",'RN-I'!B5,"")))

The range of rows that need to be inlcuded is 7 thru 123. It would be nice
if rows 64, 65, 66, 94, 95, & 96 were not included as they are separators
that ID job titles. This is not necessary but would be nice if it could be
accomplished.

Now what I'm after is if the equation for a given row in columns I, O, and U
(all three) results in the display of "", then hide that row of Information.
Otherwise display that row.

Again once I can get this to work, I'm going to replicate it for each day in
a general month. So that all the one needs to do is fill in the 4 month
schedule tabs and then hit print all sheets to have Daily schedule ready for
use.

Thanks for all of the help.
Jason

 
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
Can you hide and unhide rows with a macro based on content of colu Husker87 Excel Programming 4 September 24th 08 01:06 AM
Macro to hide rows based on criteria Santa-D Excel Programming 5 July 1st 08 09:08 AM
Macro to Hide rows based on value of column F Scott Marcus Excel Discussion (Misc queries) 10 October 27th 06 11:57 PM
Macro to hide rows based on a zero value in a particular cell Peter Excel Programming 2 July 29th 04 03:19 AM
macro to hide rows based on formula? Scott T. Lindner Excel Programming 5 October 20th 03 01:40 PM


All times are GMT +1. The time now is 11:46 PM.

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

About Us

"It's about Microsoft Excel"