How to reference another sheet

000

Board Regular
Joined
Jun 3, 2011
Messages
59
Hello,

I would love some help with creating what should be an easy formula. I need an equation that will look at cell B11 on a sheet titled "Data Entry" and if that cell says "YES", hide row 22 on a sheet titled Office Docs List.

Thank You!!!!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Referencing a cell on another sheet in a formula is easy...
'Data Entry'!B11
...but a formula can't hide a row.
 
Upvote 0
I was trying to throw a line of code in my macro a long the lines of

Rows("22").EntireRow.Hidden = True

I just do not know how to reference the first part of the code.
 
Upvote 0
I didn't realize you wanted VBA code. You had said "formula" in your original question.

Try something like this...
Code:
    If Sheets("Data Entry").Range("B11").Value = "Yes" Then
        Sheets("Office Docs List").Rows(22).Hidden = True
    Else
        Sheets("Office Docs List").Rows(22).Hidden = False
    End If

Or just this...
Code:
Sheets("Office Docs List").Rows(22).Hidden = Sheets("Data Entry").Range("B11").Value = "Yes"
 
Last edited:
Upvote 0
If Sheets("Data Entry").Range("B11").Value = "YES"
Then Sheets("Office Docs List").Rows(22).Hidden = True

It is having a problem running this code.
 
Upvote 0
It's having a problem likely because this
Rich (BB code):
If Sheets("Data Entry").Range("B11").Value = "YES"
Then Sheets("Office Docs List").Rows(22).Hidden = True
Should be like this
Rich (BB code):
If Sheets("Data Entry").Range("B11").Value = "YES" Then
Sheets("Office Docs List").Rows(22).Hidden = True
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top