# Need Help modifying a Formula

#### caribou48

##### New Member
Hello all ,

I have a rather complex forumula that was from a pre-existing sheet. I did not create the sheet. But it works very well.
Basically this formula counts all the Letters in a row I d like to modify it so it sums any numbers, and remove the weekday restriction
(We now have people on Saturday shifts)

 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Leave Name Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun BOB Smith 7 H 0

<tbody>
</tbody>

Formula is in the LEAVE column
ATM it could count the letters we use to trace Holidays - H for Holiday
But we want to sum these now as we are tracking by hours . 7.5

=SUM(--NOT(ISNUMBER(IF(WEEKDAY(DATE(\$A\$7,\$A\$8,OFFSET(\$A\$10,0,31*(\$A\$8-1)+1,1,31)),2)<=5,OFFSET(A13,0,31*(\$A\$8-1)+1,1,31),0)))*--NOT(ISNUMBER(MATCH(DATE(\$A\$7,\$A\$8,OFFSET(\$A\$10,0,31*(\$A\$8-1)+1,1,31)),Holidays!\$B\$2:\$B\$12,0))))+COUNT(OFFSET(\$A\$10,0,31*(\$A\$8-1)+1,1,31))-31

The sheets uses a form control scroll bar to slide from month to month,
and increase the month number in A8 , A7 contains the year.
The days and days of the week are then populated by another formula and a macro hids the relevant colums, Its a wonderfull sheet. But the formula is just a little to complex for me to edit

#### jorismoerings

##### Well-known Member
Hi,

With the risk of perhaps oversimplifying your question.

If you remove the weekday restriction from the old formula and you want the new formula to sum numbers; wouldn't those changes convert the old formula to just a regular SUM formula on the particular row.

#### sanrv1f

##### MrExcel MVP
It would be difficult to de-chipher an existing formula and modify it without knowing the background

It would be better to post some sample data and expected result, along with the logic, to help us understand the problem and help you

#### caribou48

##### New Member
It would be difficult to de-chipher an existing formula and modify it without knowing the background

It would be better to post some sample data and expected result, along with the logic, to help us understand the problem and help you

Sample data is in the link above

1,081,779
Messages
5,361,238
Members
400,618
Latest member
Gamaway

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...