bin mal wieder am Basteln
Sub Test()
mc = ActiveCell.Address
MsgBox mc ' $A$1
End Sub
Wie stelle ich es an, das die MsgBox nur den Buchstaben auswirft?
Gruß Sonnenpeter
Sub Test()
mc = ActiveCell.Address
MsgBox mc ' $A$1
End Sub
Sub sonnenpeter()
Dim S As String
S = Cells(1, ActiveCell.Column).Address(0, 0)
With WorksheetFunction
MsgBox .Substitute(S, 1, "")
End With
End Sub
Sub SonnenpetersBastelei()
'myNum = Application.InputBox("Enter a number")
mc = ActiveCell.Address(0, 0)
'MsgBox mc
S = Cells(1, ActiveCell.Column).Address(0, 0)
With WorksheetFunction
S2 = .Substitute(S, 1, "")
End With
'MsgBox S2
ActiveCell.Offset(1, 0).Activate
Range(Selection, Selection.End(xlDown)).Select
Selection.Replace What:=mc, Replacement:="$" & S2 & "$1", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveCell.Offset(-1, 1).Activate
End Sub
Sub Spalte()
Dim SN$, SZ%
SZ = ActiveCell.Column
If SZ < 27 Then
SN = Left(Columns(SZ).Address(0, 0), 1)
Else
SN = Left(Columns(SZ).Address(0, 0), 2)
End If
MsgBox SN
End Sub
MsgBox Split(ActiveCell.Address, "$")(1)
Sub test()
Dim s, s1, s2 As String
s = Selection.Address
s1 = Mid(s, 2, InStr(2, s, "$") - 2)
If InStr(1, s, ":") > 0 Then
s2 = Mid(s, InStr(1, s, ":") + 1)
s2 = Mid(s2, 2, InStr(2, s2, "$") - 2)
s1 = s1 & ":" & s2
End If
s = MsgBox(s1, vbOKOnly, "Relevante Spalten")
End Sub
Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden
Suche nach den besten AntwortenEntdecke unsere meistgeklickten Beiträge in der Google Suche
Top 100 Threads jetzt ansehen