Multiple Sheets IF/Then or VBA Help

jfrank90

New Member
Joined
Nov 17, 2014
Messages
2
Hi I am looking to create a formula or "event" where when a Cell is clicked it takes you to another area of a different sheet for further information, I know this can be done with a simple hyperlink but due to the sensitivity of the material I need something additional to happen. Basically I want to be able to click on cell A1 in sheet 1, that would then take me to a section in sheet 2 where there is more information, but I only want to see the information that pertains to cell A1 Sheet 1. There will be data in a lot of cells in column A so there will be a lot of info on Sheet 2.

Essentially
  1. Click on cell A1 in Sheet 1
  2. Takes you to Sheet 2
  3. "Hides" all information on sheet 2 except A1, B1,C1, and D1
  4. Go back to Sheet 1
  5. Click on cell A2 in Sheet 1
  6. Takes you to Sheet 2
  7. "Hides" all information on sheet 2 except, A2, B2, C2, and D2
Any help is appreciated.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
Dim acell As Integer

Application.ScreenUpdating = False

acell = ActiveCell.Row
Sheets("Sheet2").Cells.EntireRow.Hidden = False
Sheets("Sheet2").Select
Sheets("Sheet2").Rows("1:" & acell - 1).Hidden = True
 
Sheets("Sheet2").Columns("E:XFD").Hidden = True
Sheets("Sheet2").Rows(acell + 1 & ":1048576").Hidden = True

Application.ScreenUpdating = True


End Sub
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,103
Members
452,302
Latest member
TaMere

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