Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 4 of 4

Thread: Show first cell in column (on Row A)

  1. #1
    Join Date
    8th September 2010
    Location
    Gent
    Posts
    96

    Show first cell in column (on Row A)

    Hello,

    I try to show the value in row A.

    With the code
    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 
    
    
    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.
    What is "stronger" then End(xlUp), and goes to the top of the column?

    aisietie

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    19th July 2004
    Location
    Tokyo, Japan
    Posts
    8,420

    Re: Show first cell in column (on Row A)

    Isn't it
    VB:
    MsgBox ("en " & Rng.EntireRow.Cells(1).Value) 
    
    

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    8th September 2010
    Location
    Gent
    Posts
    96

    Re: Show first cell in column (on Row A)

    Thanks Jindon.
    Buy instead of Entirerow, I need to use Entirecolumn, and then it works.

    Thanks a lot


    aisietie

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    19th July 2004
    Location
    Tokyo, Japan
    Posts
    8,420

    Re: Show first cell in column (on Row A)

    Ahhh

    Show first cell in column

    Of course.

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Show All Text In ListBox Column
    By Randal in forum EXCEL HELP
    Replies: 2
    Last Post: April 23rd, 2009, 21:14
  2. Show Column Names In Listbox
    By vbasql in forum Excel and/or SQL Help
    Replies: 6
    Last Post: February 1st, 2008, 22:41
  3. Column headings to show at top of screen
    By patoba in forum Excel and/or Word Help
    Replies: 1
    Last Post: September 16th, 2004, 20:45
  4. Column and Headers show only numbers
    By Cronina in forum EXCEL HELP
    Replies: 2
    Last Post: July 13th, 2004, 00:35
  5. [Solved] Formulas: to show last cell on a pivot column
    By Colin Nicol in forum EXCEL HELP
    Replies: 4
    Last Post: September 12th, 2003, 06:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno