Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Help Required (19th Dec 2015)

Hi Team,

Can someone help me with a code.

I have one sheet with the name as Go_To. In this sheet I have dates mentioned from 1st Jan to 31st Dec.

I have one more sheet with the name as Status_Report. The sheet has been designed day wise.

What I want is if I click on a specific date on Go_To sheet it shld take me to specific cell on the sheet named as Status_Report.

I can do it using Hyperlink but it wld be a too leanthy process. Can someone help me with a code for the same.

Awaiting for a helping hand.

Rgds

Akash Maheshwari
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Help Required (19th Dec 2015)

Hi Akash,

Am Fri, 18 Dec 2015 10:47:53 -0800 (PST) schrieb Akash:

I have one sheet with the name as Go_To. In this sheet I have dates mentioned from 1st Jan to 31st Dec.

I have one more sheet with the name as Status_Report. The sheet has been designed day wise.

What I want is if I click on a specific date on Go_To sheet it shld take me to specific cell on the sheet named as Status_Report.

I can do it using Hyperlink but it wld be a too leanthy process. Can someone help me with a code for the same.


not enough informations.
In which range on Go_To and in which range on Status_Report are the
dates?


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Help Required (19th Dec 2015)

Hi,

In Go_To sheet? I have columns for every month from Jan to Dec.

JAN 1st is in cell A2
JAN 31st is in cell A32

FEB 1st is in cell B2
FEB 29th is in cell B30

Suppose if I click on Cell A2 i wld like to go on a date mentioned on a specific cell in the sheet named as Status_Report.

Hope this clerifies ur confussion.

Rgds

Akash Maheshwari

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Help Required (19th Dec 2015)

Hi Akash,

Am Fri, 18 Dec 2015 11:00:41 -0800 (PST) schrieb Akash:

JAN 1st is in cell A2
JAN 31st is in cell A32

FEB 1st is in cell B2
FEB 29th is in cell B30

Suppose if I click on Cell A2 i wld like to go on a date mentioned on a specific cell in the sheet named as Status_Report.


right click on sheet tab of Go_To = Show code and insert following
code:

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
If Intersect(Target, Range("A2:L32")) Is Nothing _
Then Exit Sub

Dim c As Range

Cancel = True
Set c = Sheets("Status_report").UsedRange.Find(Target, LookIn:=xlValues)
If Not c Is Nothing Then Application.Goto c
End Sub

With right click on a date you will come to sheet "Status_Reoprt".


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Help Required (19th Dec 2015)

Hello Mr. Claus,

The code didnt worked....

I am trying to explain you in another way.

I have two sheets:
One Sheet name "Go_To".
Second Sheet name is "Status Report".

In the Sheet Go_To I have one date as 12/19/2015 in Cell A2
In the Sheet Status_Report I have a section with is related to 12/19/2015 in the cell B25.

I can do this through hyperlink but I dont want to do it in that way as its a very long process. Instead of this I want to use a code which can link the cell in Go_To sheet (Cell A2) with Status_Report Sheet (Cell B25). I would replicate code for other dates tooo.

Hope I am able to to make you understand the requirement.

Awaiting for your response.

Best Regards

Akash Maheshwari







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Help Required (19th Dec 2015)

Hi Akash,

Am Fri, 18 Dec 2015 18:12:25 -0800 (PST) schrieb Akash:

The code didnt worked....


then you are doing something wrong. The code is tested and if you right
click on a date in Go_To and this date exists in "Status_Report" it will
be selected in "Status_Report".


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Help Required (19th Dec 2015)

Hi Claus,

I dont want to select a Cell in the sheet named as "Status_Report".

It should work like Hyperlink. If I click on a date mentioned in the cell on the sheet named as Go_To then it should take me to a specific cell on the sheet named as Status_Report".

I dont want to use hyperlink option as its very tedious. Instead of it If I can get a code it wld be very handy.

Hope I am able to make you understand.

Best Regards

Akash Maheshwari



On Saturday, December 19, 2015 at 1:40:57 PM UTC+5:30, Claus Busch wrote:
Hi Akash,

Am Fri, 18 Dec 2015 18:12:25 -0800 (PST) schrieb Akash:

The code didnt worked....


then you are doing something wrong. The code is tested and if you right
click on a date in Go_To and this date exists in "Status_Report" it will
be selected in "Status_Report".


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Help Required (19th Dec 2015)

Hi Akash,

Am Sun, 20 Dec 2015 04:48:15 -0800 (PST) schrieb Akash:

It should work like Hyperlink. If I click on a date mentioned in the cell on the sheet named as Go_To then it should take me to a specific cell on the sheet named as Status_Report".


look he
https://onedrive.live.com/redir?resi...=folder%2cxlsm
for "Status_Report" and download the file because macros are disabled in
OneDrive.


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Help Required (19th Dec 2015)

Hi Akash,

Am Sun, 20 Dec 2015 04:48:15 -0800 (PST) schrieb Akash:

It should work like Hyperlink. If I click on a date mentioned in the
cell on the sheet named as Go_To then it should take me to a
specific cell on the sheet named as Status_Report".


look he
https://onedrive.live.com/redir?resi...=folder%2cxlsm
for "Status_Report" and download the file because macros are disabled
in OneDrive.


Regards
Claus B.


Claus,
Perhaps the issue is ScrollRow, depending on where the GoTo target is?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Help Required (19th Dec 2015)

Hi Garry,

Am Sun, 20 Dec 2015 14:13:48 -0500 schrieb GS:

Perhaps the issue is ScrollRow, depending on where the GoTo target is?


I hope for a better explanation of his problem.


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Help Required (19th Dec 2015)

Hello Mr. Clause,

The code is working when I have only one date in the sheet named as Status_Report. When I have same date twice in the sheet named as Status_Report its not working.

Can i have code which states that if a user clicks on cell A1 of the sheet named as Go_To, then system should take him to the cell No C5 in sheet named as Status_Report.

I tried to make a macro but a macro has been created.

Sub Macro3()
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"Status_Report!C5"
End Sub

I dont want a macro. I want a simple code to solve this issue.

Hope I am able to understand you my problem.

Best Regards

Akash Maheshwari
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Help Required (19th Dec 2015)

Put this code in Go_to sheet.in case your status_report sheet contains duplicates it will take you to first value which comes in the Sheet, you need to double click on the cell.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Range("A2:A50000"), Target) Is Nothing Then
Set d = Sheets("Status_Report").Range("A1:A50000").Find(Wh at:=Target, LookIn:=xlValues, lookat:=xlWhole)
' MsgBox d.Address
Sheets("Status_report").Activate
Sheets("Status_report").Range(d.Address).Select
End If
End Sub

Regards,
Mandeep baluja
Reply
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
Help Required - 11th Dec 2015 Akash Maheshwari Excel Discussion (Misc queries) 3 December 10th 15 08:17 PM
Help Required 9th Dec 2015 Akash Maheshwari Excel Discussion (Misc queries) 2 December 9th 15 06:36 PM
IF this cell is between 2/1/2015-2/28/15, then do something David Zman Excel Discussion (Misc queries) 2 February 19th 15 07:16 PM
copy only the 1st, 7th, 13th, 19th, 25th.....row only vcff Excel Discussion (Misc queries) 6 January 15th 08 04:21 PM
Problem with sorting 19th century dates Robert Judge Excel Worksheet Functions 2 January 8th 07 02:17 AM


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