Advertisement

08.18.2007 at 07:17AM PDT, ID: 22771563
[x]
Attachment Details

Convert Excel formula to Perl??

Asked by rkckjk in Perl Programming Language

Tags: excel, perl, formula

I'm using the Perl module: Spreadsheet::WriteExcel in which I'm trying to create a Excel spreadsheet. It's seems that the formula below is maybe to complex for the modules to interpet.

What the formula is basically trying to say is that, how many time entries in the cell range of E2:E23 are within a time range of 6:30pm and 7:00am.

typically data:

4:15am
3:36am
1:19am
5:10am
5:47am
3:49am
3:57am
2:09am
4:24am
4:15am
6:12am
5:49am


=SUM(IF(NOT(ISERROR(TIMEVALUE(SUBSTITUTE(SUBSTITUTE(UPPER(E2:E23),"AM"," AM"),"PM", " PM")))),IF((TIMEVALUE(SUBSTITUTE(SUBSTITUTE(UPPER(E2:E23),"AM"," AM"),"PM", " PM"))<TIME(7,0,0))+(TIMEVALUE(SUBSTITUTE(SUBSTITUTE(UPPER(E2:E23),"AM"," AM"),"PM", " PM"))>TIME(18,30,0))>0,1,0),0))


The answer in this case would be 12. All the data in the range are within the time frame.

So, that's what I'm looking to do in Perl somehow, maybe with a counter that keeps track of the entries that are within the time frame.

thanks Start Free Trial
[+][-]08.18.2007 at 10:07AM PDT, ID: 19723055

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 10:09AM PDT, ID: 19723061

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 10:20AM PDT, ID: 19723109

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 10:46AM PDT, ID: 19723209

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 11:02AM PDT, ID: 19723242

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: excel, perl, formula
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.18.2007 at 11:20AM PDT, ID: 19723320

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 11:29AM PDT, ID: 19723357

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 11:45AM PDT, ID: 19723407

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 12:00PM PDT, ID: 19723445

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 12:08PM PDT, ID: 19723466

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 12:14PM PDT, ID: 19723480

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628