ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select the same cell in different sheets in the same workbook? (https://www.excelbanter.com/excel-programming/339122-select-same-cell-different-sheets-same-workbook.html)

pea

Select the same cell in different sheets in the same workbook?
 
Hi
I'm using the following code in a workbook. I'm investigating data by
charting the data in the sheet "kurve".
Sub Auto_Open()
'

Sheets("Liste").Select
Range("AC2").Select

Sheets("Justliste").Activate
Range("AC2").Select

Sheets("JustRatioListe").Activate
Range("AC2").Select

Sheets("GNværdier").Activate
Range("AC2").Select

Sheets("Liste").Select
End Sub

Sub MellemdatacheckComplet()
'
'Kopierer pladeværdierne i liste (ukompenseret)til kurvearket
Sheets("Liste").Activate
ActiveCell.Offset(0, 0).Range("A1:GS1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Kurve").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True


'Kopierer pladeværdierne kompenseret for HDW fra JustListe

Sheets("JustListe").Activate
ActiveCell.Offset(0, 0).Range("A1:GS1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Kurve").Select
Range("C3").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True




'Gennemsnitsværdierne af plademålingerne Ukompenseret
Sheets("GNværdier").Activate
ActiveCell.Offset(0, 0).Range("A1:CV1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Kurve").Select
Range("D3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True


'Kopierer kompenseret for ratio og pen
Sheets("JustRatioListe").Activate
ActiveCell.Offset(0, 0).Range("A1:GS1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Kurve").Select
Range("E3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True



Sheets("Kurve").Select




End Sub

I use the macro "MellemdatacheckComplete" to investigate the data row by row
from the top in the 4 sheets "Liste", JustListe", "GNværdier"and
JustRatioListe".As you see in the autoopen the macro "mellemdatachec" starts
in the same column and row in the 4 sheets.

What I want is if I could type a rownumber in a listbox or something, so I
had the same cell (cell address) selected in the 4 sheets and so afterwards
run the macro "mellemdatacheckComplete?
Could sombody help me with the code?
Regards


All times are GMT +1. The time now is 11:36 AM.

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