LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Code Does Not Work Depending On Formula

If I use: =IF(Sheet2!D22,Sheet2!D22,"") in column A (with no value)
The code below works.
IfI use: =Sheet2!D22 in column A (with no value)
The code does not work.
Why?
Thanks,
Bob

Private Sub CommandButton1_Click()
Dim rw As Long
Application.ScreenUpdating = False
'Me is the object that owns the code
'in this case Sheet1
With Me 'Sheets("Sheet1")
For rw = 1 To 30
If .Cells(rw, "A").Value = "" Then _
.Rows(rw).Hidden = True
Next rw
.PrintOut ' for testing use .PrintPreview
.Range("A1:A30").EntireRow.Hidden = False
End With
Application.ScreenUpdating = True
End Sub







 
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
Execute VB code depending on time of day WA Excel Discussion (Misc queries) 1 January 7th 10 07:41 PM
VBA code to automatically colour cells depending on text? mj_bowen Excel Discussion (Misc queries) 0 January 2nd 10 07:44 PM
fomula which returns the amount depending on the currency code Narnimar Excel Discussion (Misc queries) 3 November 23rd 08 12:50 PM
Obtain rate for work center, depending on year Pierre Excel Worksheet Functions 5 April 28th 08 04:12 PM
Select stock code depending on description in next column sako 338 Excel Worksheet Functions 4 March 1st 07 02:32 AM


All times are GMT +1. The time now is 10:49 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"