View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Assigning consecutive dates

Well if you must have the solution as well as my eloquence <G

=A1+IF(COUNTIF($A$1:A1,A1)=30,IF(WEEKDAY(A1)=6,3,1 ))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Brooke" wrote in message
...
So what is that alternative approach? Did I loose you know?? :)

"Bob Phillips" wrote:

Uuum, tricky eh.

Here is an alternative approach, which seems to work correctly even in

those
situations.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Brooke" wrote in message
...
Bob,
Try copying the formula down about 500 records. For some reason it

starts
the date range over. So I have it started at 9-5-06 and then after it

hits
09-11-06 it starts back to 9-10-06 and puts 09-11-06 again. Not sure

why
so
it reads 09-05-, 09-06, 09-07, 09-08, based on 30 records then goes to
09-11-06 for the next 30 records, but when it goes to the next 30

records
it
goes to 09-10-06????? Then it repeats 09-11-06 again then starts to

09-12-06.


Let me know your thoughts. I have 1500 records. Is it a copying

issue??
"Bob Phillips" wrote:

You have lost me. If you start with 14th Aug 2006, the next date is

15th, at
least it is in my tests. I fail to see how it could possibly count
backwards.

In my original formula, IF(WEEKDAY(A1)+6 just tests if the previous

date
is
a Friday, if some return 3 else return 1. The result of this test is

added
to A1 to skip weekend dates.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Brooke" wrote in message
...
When I write this formula and use the start date 8-14-06 it is

computing
the
next date as 08-12-06. This would be the weekend date???

I just used your formula =A1+IF(weekday(A1)=6,3,1 and just then

added
/30.
So now it reads =A1+IF(WEEKDAY(A1)=6,3,1/30 - This excluded the

weekend
days
and then put a new date after every 30 records. Yeah.

Now can you tell me what 6,3,1 is all about? I want to understand

the
formula and I'm not sure why you used those numbers.
Thanks so much for the quick responses.

"Bob Phillips" wrote:

Okay, I think I get it.

Try this


=INT($A$1+INT(ROW()-1)/30)+(WEEKDAY(INT($A$1+INT(ROW()-1)/30))=7)*2

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing

direct)

"Brooke" wrote in message
...
Thank you for the formula. I will example. I have multiple

sales
people
within a spreadsheet. I want to only assign a date to one

particular
individual within the spreadsheet without having to copy it

into
another
worksheet. Then, I want to assign the same date to 30

records.
After
those
30 assign the next day and so forth. I need to exclude

weekends
when
assigning dates.

Does this help? Please advise.
thanks
Brooke

"Bob Phillips" wrote:



"Brooke" wrote in message
...
I received the answer on assigning consecutive dates but

what
can
be
done
to
the formula

=INT($A$1+INT(ROW()-1)/30)

TO:

1. Not include weekends

Don't get your formula.

My suggestion

=A1+IF(WEEKDAY(A1)=6,3,1)


2. Only assign the date to a certain person's name if

there is
multiple
reps
on the spreadsheet.

Don't understand that bit.