Isn't it
VB:MsgBox ("en " & Rng.EntireRow.Cells(1).Value)
Hello,
I try to show the value in row A.
With the code
I want that the cell value in rowA is shown, but the code returns the first non blanc cell above the found range in the column, and not the top cell (on RowA)in the column.VB:Dim FindString As String Dim Rng As Range FindString = strSheetname If Trim(FindString) <> "" Then With Sheets(strSheetname).Range(dat1, dat2) Set Rng = .Find(What:=FindString, _ After:=.Cells(.Cells.Count), _ LookIn:=xlValues, _ lookat:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not Rng Is Nothing Then MsgBox ("en " & Rng.End(xlUp)) Else MsgBox "Nothing found" End If End With End If
What is "stronger" then End(xlUp), and goes to the top of the column?
aisietie
Isn't it
VB:MsgBox ("en " & Rng.EntireRow.Cells(1).Value)
Thanks Jindon.
Buy instead of Entirerow, I need to use Entirecolumn, and then it works.
Thanks a lot
aisietie
Ahhh
Show first cell in column
Of course.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks