View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default If then Function Problems

MJ,

The macro reads down column A looking for properly formatted dates that are
a Friday and builds up those rows into a range which it then copies to sheet
2. You may have to change the sheet names to match your requirements.
When I run it it copies like this to sheet 2 bit it will copy what is there
so that doesn't matter, the only thing that does is that the date must
actually be a date.

Friday Mar 07 2008 1 2 3 6
Friday Mar 07 2008 1 2 3 99
Friday Mar 07 2008 5 6 7 99
Friday Mar 07 2008 6 7 8 88

You need to be a bit more descriptive about what not working means but I am
already suspicious of your dates, check they are correctly formatted dates
and not just text.

Mike



"MJ" wrote:

I could not get this to function correctly...I think this is what I am
looking for, but let me re-explain.

A B C D
Friday, ETC 100 -30 Negative
Thursday, ETC 150 20 False

and this goes on and on for all different days.

Now what I need is a script that will choose only the Friday Rows and copy
them to Sheet 2

This is the exact form of my sheet I just don't get how to do it.

Thanks for any and all help

"Mike H" wrote:

MJ,

the first instance of the line
myrange1.select
was for testing my code, you can delete it but you need to keep the second
instance

Mike

"MJ" wrote:

I have a spreadsheet that has the date in column A in this form "Friday,
March 06, 2008" and I wanted to be able to pull every row that has a friday
and put into a seperate worksheet.

So ever day that is a friday will put then next 4 cells in the row into a
sheet 2.

I know there is a way to do this but my VB is weak to say the least.

Thanks
MJ