View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
CJLuke CJLuke is offline
external usenet poster
 
Posts: 17
Default Macro If Then...?

Ok...I have an update for those of you who might be interested in helping
out. I have written the following macro using If...Then:

Sub IfThen()

If Range("M4") 0 Then Range("A4:M4").Select
Selection.Cut
Sheets("JP Morgan - VRDNs").Select
Range("A4").Select
ActiveSheet.Paste

End Sub

This will cut the entire row out of the sheet if the Range "M4" is populated
and paste it into the tab "JP Morgan - VRDNs." However, the list is of
securities is about 500 hundred rows long. Instead of writing the same macro
above 500 times, is there a more efficient way to go about writing it?


"CJLuke" wrote:

I have a list of data that I want to filter. However, the last column on the
sheet, if populated, indicates a certain type of investment security that I
want to separate from the list. How can I write a macro that wil cut & copy
each row that has this field populated?

I was thinking If...then, but I am still very new at writing Macros...I'll
be working on it, and any help would be greatly appreciated!!!

Charles