Consulting

Results 1 to 2 of 2

Thread: Extract certain data from file.

  1. #1
    VBAX Contributor
    Joined
    Apr 2008
    Posts
    136
    Location

    Extract certain data from file.

    I am using VBA code to read formulas I have put in a Lookup table. It extracts information from a file and puts it into a Master file into the matching column. Looks at file column by column to extract data.

    I need an excel formula or vba code to check whether one of the columns in a file contains the word "Happy" anywhere in the string. If it does exit loop, otherwise copy the data accross to the Master sheet. I'm not sure the best way to tackle this.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Something like

    [vba]

    If Application.CountIf(Columns("C:C"),"*Happy*") > 0 Then

    'etc.
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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