Please Help me

  • Thread starter Thread starter Headbutt
  • Start date Start date
H

Headbutt

Thank you,

I have a spreadsheet that uses web querry to download date into a
spreadsheet, however i need to be able to extract data from the cells
see below:-

Cell A Cell B Cell C
Shergar 97 ****
Flinstone 78 ***
Me Again 1000 ****

what I want to do is be able to search cell C for all the **** and
extract the horses name in cell A and save this info to another sheet.
so in the above example I would have

Shergar ****
Me Again ****

Ps there could upto 500 horses to search each on its own line

how would i write a VB piece of code to do this ?

any help would be welcome

thanks
headbutt
 
Headbut

Try this

Ton

Sub aaa(
outfile = Workbooks("book2").Sheets("sheet1").Range("a1").Address(external:=True
cnta =

Range("c2").Selec
While Not IsEmpty(ActiveCell
If ActiveCell = "****" The
Range(outfile).Offset(cnta, 0) = ActiveCell.Offset(0, -2
Range(outfile).Offset(cnta, 1) = ActiveCel
cnta = cnta +
End I
ActiveCell.Offset(1, 0).Selec
Wen

End Su

----- Headbutt > wrote: ----

Thank you

I have a spreadsheet that uses web querry to download date into
spreadsheet, however i need to be able to extract data from the cell
see below:

Cell A Cell B Cell
Shergar 97 ***
Flinstone 78 **
Me Again 1000 ***

what I want to do is be able to search cell C for all the **** an
extract the horses name in cell A and save this info to another sheet
so in the above example I would hav

Shergar ***
Me Again ***

Ps there could upto 500 horses to search each on its own lin

how would i write a VB piece of code to do this

any help would be welcom

thank
headbut
 
Back
Top