Results 1 to 11 of 11

How to search a column with keywords and write decimal value in to a row

Threaded View

  1. #6
    Forum Contributor
    Join Date
    07-05-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    100

    Re: How to search a column with keywords and write decimal value in to a row

    According to your advise the code would be

    Sub Button_click()
    Dim r As Range, s As String
    
        Set r = Range("B2", Range("B5856").End(xlUp))
    
        r.Offset(0, 2).ClearContents
    
        s = InputBox("What to find?")
    
        With Range("B1")
            .AutoFilter Field:=1, Criteria1:=s
            
            On Error Resume Next
            
            Set Rng = r.Cells.SpecialCells(xlCellTypeVisible) 'if no items found
            
            If Rng Is Nothing Then
                MsgBox "No records found"
                .AutoFilter
                Exit Sub
            End If
            
            r.Offset(0, 2) = 1.01
            .AutoFilter
        End With
    
    
    End Sub
    If I type Project Management Plan its displays 1.01 in the D1 cell. It is wrong. 1.01 should be in 58 cells( D4,D14,D58.... etc.)
    Last edited by davesexcel; 07-05-2010 at 11:11 PM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1