View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Matt Matt is offline
external usenet poster
 
Posts: 516
Default Delete and Shift Cells up

Wow, thanks for your QUICK response. Yes would you be able to help me code
this. So it is like this, Start in cell A1 and go down(just column A is fine)
search for the value in the cell to be < "Sales" Then delete row and shift
up the rows. But If the value = "Sales" then break out of the loop.
Thanks,

"Bernard Liengme" wrote:

I think a big No to part 2. When you 'save' an email attachment you are
really just copying a file from a temp to a permanent folder so Excel does
not know anything is happening to the file
You could have the macro run when the file is opened with an 'open even'
Private Sub Workbook_Open()
run the code
End Sub
This code must go on the workBOOK module - right click the Excel log next to
'File' on the menu and use View code

Do you have a question about coding the macro?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"matt" wrote in message
...
Hi all,
I'm trying to create a macro that will start at the very first cell, I
guess
A1, and work it's way down, and will check the value of the cell. If the
value of the cell is not equal to the word "Sales" then delete that row.
but
if it finds the word sales then stop the process.
Also can I have this macro be able to autorun on the save of the doc? For
instance if I save an email attchment that is an excel file will it run
when
I save the attachment without opening the file and then saving it? So to
be a
little more clear if I right-click on the excel attached file in the email
and click save, can i have this macro run?