LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default If function with two results required

I think this is going to work.. will need to tweak a little to do line by line
--
Thanks for your help!
Loretta


"JE McGimpsey" wrote:

No, functions can only return values to their calling cells, they can't
format/hide/etc.

You could use an event macro to do this automatically. Put something
like this in your worksheet code module (right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Calculate()
Dim rCell As Range
On Error GoTo ErrHandler
Application.EnableEvents = False
For Each rCell In Range("B2:B" & Range("B" & _
Rows.Count).End(xlUp).Row)
With rCell
.EntireRow.Hidden = (.Value = vbNullString)
End With
Next rCell
ErrHandler:
Application.EnableEvents = True
End Sub

In article ,
Loretta wrote:

I'm using Excel 2003, have a workbook with multiple linked tabs and one page
(printout tab), I want to hide rows with no data automatically (not manually).

Currently using this function: =IF('Bid Form'!B16=0,"",'Bid Form'!$A16 &"A")
Can I substitute the "" with some command to make it hide the entire row
(when B16=0)??


 
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
add OR to already nested If function - help required N E Body Excel Worksheet Functions 3 November 12th 06 02:43 AM
Help required with COUNTIF/AND function DAT Excel Worksheet Functions 3 August 3rd 06 07:38 PM
Count Function help required KSteven Excel Worksheet Functions 1 February 10th 06 12:07 PM
Count function required mickbarry Excel Discussion (Misc queries) 2 February 10th 06 02:43 AM
Cell function required mickbarry Excel Worksheet Functions 6 February 7th 06 11:34 PM


All times are GMT +1. The time now is 06:38 AM.

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"