ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Jump to a sheet based on the reference in a cell. (https://www.excelbanter.com/excel-programming/427629-jump-sheet-based-reference-cell.html)

Elton Law[_2_]

Jump to a sheet based on the reference in a cell.
 
Dear Expert,
Got a very complicated VB that I cannot figure out ?
A workbook contains few sheets.
"Raw", "Daily", "Weekly", "Monthly" ...

Can I set a marco if there is a text "Check" then go to the respective
sheets to update the data please ?
For LC115534, there is a "check" and "daily" ...
For GB120268, there is a "check" and "monthly" ... can it go to Sheets
"Monthly" and update something please ? I can use find "GB120268" and update
the latest data later.


Expiry In Sheets
LC115534 17-Feb-09 Daily Check 12.1
TR115776 17-Feb-09 Daily 11.2
GB116981 18-Feb-09 Daily Check 62.9
EQ117150 #N/A Daily 21.1
SS118845 18-Feb-09 Daily 117.4
AQ119605 18-Feb-09 Daily 24
TR120182 19-Feb-09 Daily 27
GB120268 17-Feb-09 Monthly Check 99
TR120513 19-Feb-09 Daily 24
GB120941 38
GB123547 19-Feb-09 Daily 24
GB125186 27-Feb-09 Weekly Check 37
EQ129944 #N/A Daily 84
SS130341 27-Feb-09 Monthly 67


joel

Jump to a sheet based on the reference in a cell.
 
Yo can't stop a macro in the middle to check a worksheet. what yo can do is
either highlight the items ot check with a macro (color the cell or rows), or
add a hyperlink on the check items to make it easier for the user to go to
the check items.

"Elton Law" wrote:

Dear Expert,
Got a very complicated VB that I cannot figure out ?
A workbook contains few sheets.
"Raw", "Daily", "Weekly", "Monthly" ...

Can I set a marco if there is a text "Check" then go to the respective
sheets to update the data please ?
For LC115534, there is a "check" and "daily" ...
For GB120268, there is a "check" and "monthly" ... can it go to Sheets
"Monthly" and update something please ? I can use find "GB120268" and update
the latest data later.


Expiry In Sheets
LC115534 17-Feb-09 Daily Check 12.1
TR115776 17-Feb-09 Daily 11.2
GB116981 18-Feb-09 Daily Check 62.9
EQ117150 #N/A Daily 21.1
SS118845 18-Feb-09 Daily 117.4
AQ119605 18-Feb-09 Daily 24
TR120182 19-Feb-09 Daily 27
GB120268 17-Feb-09 Monthly Check 99
TR120513 19-Feb-09 Daily 24
GB120941 38
GB123547 19-Feb-09 Daily 24
GB125186 27-Feb-09 Weekly Check 37
EQ129944 #N/A Daily 84
SS130341 27-Feb-09 Monthly 67


Don Guillett

Jump to a sheet based on the reference in a cell.
 
Not quite sure I understand what you want but this will copy the rows to the
appropriate sheet.

Sub copytosheets()
slr = Cells(Rows.Count, "a").End(xlUp).Row
For Each c In Range("d2:d" & slr)
If c = "Check" Then
'MsgBox c.Offset(, -1)
With Sheets(Trim(c.Offset(, -1)))
lr = .Cells(Rows.Count, "a").End(xlUp).Row + 1
c.EntireRow.Copy .Cells(lr, "a")
End With
End If
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Elton Law" wrote in message
...
Dear Expert,
Got a very complicated VB that I cannot figure out ?
A workbook contains few sheets.
"Raw", "Daily", "Weekly", "Monthly" ...

Can I set a marco if there is a text "Check" then go to the respective
sheets to update the data please ?
For LC115534, there is a "check" and "daily" ...
For GB120268, there is a "check" and "monthly" ... can it go to Sheets
"Monthly" and update something please ? I can use find "GB120268" and
update
the latest data later.


Expiry In Sheets
LC115534 17-Feb-09 Daily Check 12.1
TR115776 17-Feb-09 Daily 11.2
GB116981 18-Feb-09 Daily Check 62.9
EQ117150 #N/A Daily 21.1
SS118845 18-Feb-09 Daily 117.4
AQ119605 18-Feb-09 Daily 24
TR120182 19-Feb-09 Daily 27
GB120268 17-Feb-09 Monthly Check 99
TR120513 19-Feb-09 Daily 24
GB120941 38
GB123547 19-Feb-09 Daily 24
GB125186 27-Feb-09 Weekly Check 37
EQ129944 #N/A Daily 84
SS130341 27-Feb-09 Monthly 67




All times are GMT +1. The time now is 07:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com