Hi patel45,
Thanks for your reply. I've also been able to make some progress on my own:
Dim ISIN As String
Dim REIHE, SPALTE As Integer
'ISIN auslesen
ISIN = ActiveCell.Value
'Historische Spreads im HIST Sheet finden
Sheets("HIST").Select
Range("A1").Select
Cells.Find(What:=ISIN, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
REIHE = ActiveCell.Row
With ActiveSheet
SPALTE = .Cells(REIHE, .Columns.Count).End(xlToLeft).Column
End With
Range(Cells(REIHE, 4), Cells(REIHE, SPALTE)).Name = "GraphSpreadRange"
Range(Cells(2, 4), Cells(2, SPALTE)).Name = "GraphTimeRange"
This gives me the correct ranges back. I thought names ranges would make it easier to refer to when it comes to draw the graph i mentioned in the second part of my thread, but so far no luck... I think i will open a new thread regarding my problem with the graph. Topic of this thread doesn't look right any more.
Bookmarks