Thread: Slightly off topic - Excel formula

1. Slightly off topic - Excel formula

User (ssylve1445@mindspring.com) posted:

I have an excel formula that I am not sure how to get working with multiple parameters.

The following formula works fine with just one month but I want it to evaluate and depending on whether or not the month is Jan, July, Aug, Oct, etc. put the date as the 31st of the month. I can only get it to work if I use one month.
=IF(MONTH(TODAY()) = 7, MONTH(TODAY()) & "/31/" &YEAR(TODAY()), MONTH(TODAY()) & "/30/" &YEAR(TODAY()))

Stephanie
NetJuice Consulting

Tell us what you think! http://us.click.yahoo.com/vO1FAB/txz...SFAA/NhFolB/TM

2. Re: Slightly off topic - Excel formula

Stephanie,

This formula

=IF(OR(MONTH(TODAY())=1,MONTH(TODAY())=3,MONTH(TOD AY())=5,MONTH(TODAY())=7,MONTH(TODAY())=8,MONTH(TO DAY())=10,MONTH(TODAY())=12),MONTH(TODAY())&"/31/"&YEAR(TODAY()),IF(MONTH(TODAY( ))=2,MONTH(TODAY())&"/28/"&YEAR(TODAY()),MONTH(TODAY())&"/30/"&YEAR(TODAY())))

might help. The OR allows up to 30 conditions to be checked, and returns TRUE if any one of them is true. This then checks for months with 31 days in them. I have also put in another IF to check for February in the FALSE part of the original IF. This won't check for leap years, so you might want to look at that.

Basically, I hope, it will put the date to the last day of the month whichever month, though I would point out I haven't properly checked this.

Dave

3. Re: Slightly off topic - Excel formula

User Jordan Gottlieb (jgottlieb@qualitechsolutions.com) posted:

Off the top of my head, I think you want to use ORs not ANDs.

What exactly are you trying to do? Since this is off topic, feel free to
email me privately.

4. Re: Slightly off topic - Excel formula

User (asim.baig@cressoft.com.pk) posted:
actually i havn't got answer to ur question, infact i want to put one myself :
)

well my question is can we retrive all the data of an excel column which is
further

splitted into two or more columns like this......

|----------------------------------------------------------
|-----------------------------------------------------------
| value2 &#0124; &#0124; val1 &#0124; &#0124; val1
|...... &#0124; &#0124; ..... &#0124; &#0124; .....

{
public table = "d:\\xml\\output.xls";
ddt_open(table);
}

the code above just gives this output...

{
val1
}

now how can i retrive the data of both sub-columns of HEAD2

i also tried this code { report_msg(ddt_val(table,"HEAD2-2")); } but it gives no
output...

any suggessions....?

Regards

Asim Zafar
Tell us what you think! http://us.click.yahoo.com/vO1FAB/txz...SFAA/NhFolB/TM

5. Re: Slightly off topic - Excel formula

User (alan.church@bt.com) posted:

When reading an Excel data sheet WinRunner gets the parameter name from the
first row of the data sheet only. So in your exmple the WinRunner parameters
two sets of data the simplest way to do it is to replace column "HEAD2" with

Alan Church
BTExact Technologies
UK

6. Re: Slightly off topic - Excel formula

User (asim.baig@cressoft.com.pk) posted:

so isn't there anything like

if not, then there should definitly be a way for
retrieving the values of the second sub-column..

any solution ? as

|---------------------------------------------------
|---------------------------------------------------
| value2 &#0124; &#0124; val1 &#0124; &#0124; val1
| &#0124; &#0124; &#0124; &#0124; .....

{
public table = "d:\\xml\\output.xls";
ddt_open(table);
}

the code above just gives this output...

{
val1
}

and i want to get the values of the second sub-column as well...... i.e the
output...

{
val1
val1
}

Asim Zafar

alan.church@bt.com on 07/26/2001 05:18:38 PM

To: winrunner@yahoogroups.com
cc: (bcc: Asim Baig/CresSoft)

Subject: RE: [winrunner] Slightly off topic - Excel formula
When reading an Excel data sheet WinRunner gets the parameter name from the
first row of the data sheet only. So in your exmple the WinRunner parameters
two sets of data the simplest way to do it is to replace column "HEAD2" with

Alan Church
BTExact Technologies
UK

7. Re: Slightly off topic - Excel formula

User (alan.church@bt.com) posted:

Beofore I go into the complexities of doing what you want can I just ask why
you need such a setup as you have described as I can see noe reason why you
can't just replace the one "HEAD2" column with two columns called "HEAD2-1"

Alan Church
BTExact Technologies
UK

8. Re: Slightly off topic - Excel formula

User (asim.baig@cressoft.com.pk) posted:
actually sir i'm not making that excel file manually,...

that file is being generated from HTML table and this table is being

generated by an XML file after applying XSL.

so this automation is just the start for checking the DB mapping for XML
documents

XSL forms that type of HTML table and opening the HTML file in MS excel result
in

sub-columns thats why i need to do it that way...
VeriSign's FREE Guide "Securing Your Web Site for Business." Get it now! http://www.verisign.com/cgi-bin/go.c...94442340008000 http://us.click.yahoo.com/6lIgYB/IWx...gFAA/NhFolB/TM

9. Re: Slightly off topic - Excel formula

User (ssylve1445@mindspring.com) posted:

without being rude...If you are going to use an existing email to post a question, please at least change the subject. That is what I normally do and it is not difficult to change the subject to something that is specific to your problem. I am just reading responses to my subject only to find that the responses have nothing to do with my question which is a little frustrating because I have to read all the responses to verify that I did not miss something.

Stephanie
NetJuice Consulting

winrunner@yahoogroups.com wrote:

actually i havn't got answer to ur question, infact i want to put one myself :
)

well my question is can we retrive all the data of an excel column which is
further

splitted into two or more columns like this......

|----------------------------------------------------------
|-----------------------------------------------------------
| value2 &#0124; &#0124; val1 &#0124; &#0124; val1
|...... &#0124; &#0124; ..... &#0124; &#0124; .....

{
public table = "d:\\xml\\output.xls";
ddt_open(table);
}

the code above just gives this output...

{
val1
}

now how can i retrive the data of both sub-columns of HEAD2

i also tried this code { report_msg(ddt_val(table,"HEAD2-2")); } but it gives no
output...

any suggessions....?

Regards

Asim Zafar

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.