Assign a range name "Myfiles" (without the quote)
to your 800 files (800 rows by 1 column) then
In a standard module paste in the beow code:
Sub ElimFileRow()
DelItem = Range("C1").Value
Set MyRange = Range("Myfiles")
For Each cell In MyRange
If cell.Value = DelItem Then
cell.EntireRow.Delete
End If
Next cell
End Sub
In cell C1 -- type in the exact file name you wish to delete,
as it appears in the range Myfiles.
Run the Macro ElimFileRow
HTH
"mirdonamy" <
[email protected]> wrote in
message news:
[email protected]...
>
> I have a text file list of .jpg files that I want to delete (rows) from
> Excel. The list has 800+ items in it. Deleting these rows one at a
> time in Excel (after doing a "find") is terribly time consuming. Does
> anyone know how to make Excel read my text file and delete the rows
> with that filename in it (automatically). The filename (listed in the
> text file) is in a column (in my excel sheet) called "filename".
>
> Any help would be most appreciated!!! Seriously! I may have to spend
> hours on this otherwise!
>
> Thank you,
> Arielle
>
>
> --
> mirdonamy
> ------------------------------------------------------------------------
> mirdonamy's Profile:
> http://www.excelforum.com/member.php...o&userid=30348
> View this thread: http://www.excelforum.com/showthread...hreadid=500059
>
Bookmarks