ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move to specific sheet and cell based on criteria entered on anothersheet (https://www.excelbanter.com/excel-programming/414066-move-specific-sheet-cell-based-criteria-entered-anothersheet.html)

[email protected]

Move to specific sheet and cell based on criteria entered on anothersheet
 
Hi All,

I would appreciate some assistance with the following:

In cell A1 on "sheet 1" I have the name of another sheet within the
same workbook, say "sheet 2".
In cell A2 on "sheet 1" I have the row and column address listed of a
cell on "sheet 2" say "C2".

What I needed is some VBA code that will go to "sheet 1" look-up the
name of another sheet
as well as the cell address on the specified sheet and then move to
the specific address and
then enter a sum formula for a predetermined range.

Does anybody have an idea on how to accomplish the above?

Thanks,

Steve

[email protected]

Move to specific sheet and cell based on criteria entered onanother sheet
 
Hi
Try this

Public Sub tester()
With ActiveSheet

Worksheets(.Range("A1").Value).Range(.Range("A2"). Value).FormulaR1C1 =
"=sum(R4C2:R6C2)"
Worksheets(.Range("A1").Value).Activate
End With
End Sub

careful with the line wrap in the editor.
From the activesheet, this will go to the sheet name in A1 and take
the address on that sheet in A2 and put the sum formula in it. The sum
is for rows 4 to 6 in column 2

regards
Paul
On Jul 15, 3:26*pm, wrote:
Hi All,

I would appreciate some assistance with the following:

In cell A1 on "sheet 1" I have the name of another sheet within the
same workbook, say "sheet 2".
In cell A2 on "sheet 1" I have the row and column address listed of a
cell on "sheet 2" say "C2".

What I needed is some VBA code that will go to "sheet 1" look-up the
name of another sheet
as well as the cell address on the specified sheet and then move to
the specific address and
then enter a sum formula for a predetermined range.

Does anybody have an idea on how to accomplish the above?

Thanks,

Steve




All times are GMT +1. The time now is 03:30 PM.

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