+ Reply to Thread
Results 1 to 2 of 2

trying to implement vfind to a counta code.

Hybrid View

  1. #1
    Registered User
    Join Date
    01-09-2012
    Location
    here
    MS-Off Ver
    Excel 2003
    Posts
    68

    trying to implement vfind to a counta code.

    is it possbile to use vfind if statement to do nothing. Im trying to get rid of on error resume. Sometime does the formula twice so i have the two last rows with the same number.

    Im trying to put the two bottom codes together. I want to try and keep everything with vfind.




    
    
      Sub Find1()
      Dim LtCol As Range
      Dim LtRow As Range
    
    
        On Error Resume Next
        With ActiveSheet
    
            myCol = WorksheetFunction.Match("Name", Rows("1:1"), 0)
            LR = .Cells(1, 2).End(xlDown).Offset(1, 0).Row
            .Cells(LR, myCol).FormulaR1C1 = "=counta(R[-" & LR - 2 & "]C:R[-1]C)"
          
         End with  
    
    
    
    end sub


    
        Set vFIND = Cells.Find("Name", LookIn:=xlValues, LookAt:=xlPart)
        If Not vFIND Is Nothing Then
            vFIND.EntireColumn.NumberFormat = "General"
            Set vFIND = Nothing
        End If
    Last edited by daillest319; 03-06-2012 at 05:00 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: trying to implement vfind to a counta code.

    Post a Sample WORKBOOK.
    Nobody wants to type data from a picture or paste text from your post into a spreadsheet as a prelude to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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