The Elsmar Cove Forum and Site Map The Elsmar Cove Wiki More Free Files The Elsmar Cove Forums Discussion Thread Index Post Attachments Listing Failure Modes Services and Solutions to Problems Elsmar cove Forums Main Page Elsmar Cove Home Page

Go Back   The Elsmar Cove Forum > Common Quality Assurance Processes and Tools > Quality Tools, Improvement and Analysis > Quality Assurance and Compliance Software Tools / Solutions > Excel .xls Spreadsheet Templates and Tools


The Elsmar Cove Forum SideBar!
Monitor the Forum
Monitor New Forum Posts
New Threads Feeds
RSS FeedRSS Feed
Sponsor Link










$ Contributor Forum Access
Courtesy Quick Links

Links that Elsmar Cove visitors will find useful in your quest for knowledge:


Howard's International Quality Services

Atul's Symphony Technologies

Dave Scott's Scott Quality Solutions

Praxiom Research Group


NIST's Engineering Statistics Handbook

IRCA - International Register of Certified Auditors

SAE - Society of Automotive Engineers

Quality Digest Portal

IEST - Institute of Environmental Sciences and Technology

ASQ - American Society for Quality


All the Important Standards and Related Web Sites in the World
Reply
 
Thread Tools Search this Thread Rate Thread Content Display Modes
  #1  
Old 1st November 2006, 07:23 AM
Manix's Avatar
Manix Manix is offline
Get Involved!!!

Registration Date: Dec 2004
Location: UK, Hampshire
 
Posts: 489
Thanks Given to Others: 100
Thanked 82 Times in 63 Posts
Karma Power: 45
Karma: 788
Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.
Send a message via Skype™ to Manix
Please Help! Excel Formula for Ebay shop fees - Help needed

Hi Guys,

I am trying to figure out a formula in Excel. Basically I am trying to acheive the following for Ebay shop fees:

If an item is listed for 30 days between a set of values for the price, then the formula works like this:
Code:
=IF(T6*E6<=0,0,IF(T6*E6<=4.99*(AND(F6=30)),0.03,IF(T6*E6<=9.99*(AND(F6=30)),0.05,IF(T6*E6<=49.99*(AND(F6=30)),0.07,IF(T6*E6<=499.99*(AND(F6=30)),0.09,IF(T6*E6>=500*(AND(F6=30)),0.11))))))
Where F6 is the cell that can be 30 or 90 days. Now this works for 30 days, but I can't seem to add to the IF function for 90 days.

It will work like this, the bold section highlighted basically says If T6*E6 is less than or equal to 4.99 and F6 is 30 days, then the returned value will be 0.03. And so on with the returned value increasing as the T6*E6 value increases. But I need to add to this formula so that if F6 is changed to 90 days the returned value is increased accordingly. Simply duplicating the formulas, adding them to the end of this one, replacing the 30 with 90 and changing the returned values does not seem to work. Excel suggests that there is a problem with my AND function.

I need it to change the value returned if F6 changes to 90 days.

Can anyone help? It's a bit difficult to explain!
__________________
All things are subject to interpretation whichever interpretation prevails at a given time is a function of power and not truth. - Friedrich Nietzsche
Reply With Quote

Sponsored Links
  #2  
Old 1st November 2006, 08:53 AM
D.Scott's Avatar
D.Scott D.Scott is offline
Super Moderator

Registration Date: Feb 2001
Location: Wellington, OH USA
Age: 69
 
Posts: 1,604
Thanks Given to Others: 80
Thanked 289 Times in 172 Posts
Karma Power: 149
Karma: 4082
D.Scott is appreciated, and has over 1700 Karma points.
D.Scott is appreciated, and has over 1700 Karma points.D.Scott is appreciated, and has over 1700 Karma points.D.Scott is appreciated, and has over 1700 Karma points.D.Scott is appreciated, and has over 1700 Karma points.D.Scott is appreciated, and has over 1700 Karma points.D.Scott is appreciated, and has over 1700 Karma points.D.Scott is appreciated, and has over 1700 Karma points.D.Scott is appreciated, and has over 1700 Karma points.
Send a message via Yahoo to D.Scott
Default Re: Excel Formula for Ebay shop fees - Help needed

Did you try putting the greater "IF" (90) first in the formula? I have experienced cases where the first passing "IF" is what's reported. Simply put, the F6=30 statement is always true with all numbers over 30. Try making the formula test the higher option first.

Dave
__________________
"Time you enjoyed wasting is not wasted time"
Reply With Quote
Sponsored Links

  #3  
Old 1st November 2006, 09:04 AM
chergh chergh is offline
On Holiday

Registration Date: May 2005
Location: UK
Age: 32
 
Posts: 398
Thanks Given to Others: 6
Thanked 45 Times in 36 Posts
Karma Power: 0
Karma: 1440
chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.
Default Re: Excel Formula for Ebay shop fees - Help needed

I think the function is simply to long for excel.

Using:

=IF(T6*E6<=0,0,IF(T6*E6<=4.99*(AND(F6=30)),0.03,IF(T6*E6<=4.99*(AND(F6=60)),0.99,IF(T6*E6<=9.99*(AND(F6=30)),0.05,IF(T6*E6<=49.99*(AND(F6=30)),0.07,IF(T6*E6<=499.99*(AND(F6=30)),0.09,IF(T6*E6>=500*(AND(F6=30)),0.11)))))))

The above forumla works.

When I try the next step:

=IF(T6*E6<=0,0,IF(T6*E6<=4.99*(AND(F6=30)),0.03,IF(T6*E6<=4.99*(AND(F6=60)),0.99,IF(T6*E6<=9.99*(AND(F6=30)),0.05,IF(T6*E6<=9.99*(AND(F6=60)),0.98,IF(T6*E6<=49.99*(AND(F6=30)),0.07,IF(T6*E6<=499.99*(AND(F6=30)),0.09,IF(T6*E6>=500*(AND(F6=30)),0.11))))))))

It stops working and gives me your 'AND' error.

Looking on google gives me this info:

The maximum length of formulas (in characters)
Old Limit: 1k characters (Pre excel 2007)
New Limit: 8k characters (Excel 2007)

The number of levels of nesting that Excel allows in formulas
Old Limit: 7 (Pre excel 2007)
New Limit: 64 (Excel 2007)

So the latter formula has 255 characters so that would point to your immediate issue being you have to many nested functions.

You can certainly do this sort of thing using VBA or you could upgrade to excel 2007.
Reply With Quote
  #4  
Old 1st November 2006, 09:49 AM
chergh chergh is offline
On Holiday

Registration Date: May 2005
Location: UK
Age: 32
 
Posts: 398
Thanks Given to Others: 6
Thanked 45 Times in 36 Posts
Karma Power: 0
Karma: 1440
chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.
Default Re: Excel Formula for Ebay shop fees - Help needed

The VBA code would go something like this:



Dim ws As Worksheet

Public Sub ebay()

Dim i As Integer
Dim commi As Integer

' commi is short for comission which i guess you are calculating

i = 0
commi = 0

i = [T6] * [E6]

If [F6] = 30 Then

If i < 0 Then

commi = 0

End If

Else

If i < 5 Then

commi = 0.03

Else

If i < 10 Then

commi = 0.05

End If




End Sub



Obviously you have to include the rest of you conditions but you should be able to do that easily enough from what I have provided.

If you need anymore help just ask
Reply With Quote
  #5  
Old 1st November 2006, 10:14 AM
Manix's Avatar
Manix Manix is offline
Get Involved!!!

Registration Date: Dec 2004
Location: UK, Hampshire
 
Posts: 489
Thanks Given to Others: 100
Thanked 82 Times in 63 Posts
Karma Power: 45
Karma: 788
Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.
Send a message via Skype™ to Manix
Default Re: Excel Formula for Ebay shop fees - Help needed

Quote:
Originally Posted by chergh View Post

The VBA code would go something like this:



Dim ws As Worksheet

Public Sub ebay()

Dim i As Integer
Dim commi As Integer

' commi is short for comission which i guess you are calculating

i = 0
commi = 0

i = [T6] * [E6]

If [F6] = 30 Then

If i < 0 Then

commi = 0

End If

Else

If i < 5 Then

commi = 0.03

Else

If i < 10 Then

commi = 0.05

End If




End Sub



Obviously you have to include the rest of you conditions but you should be able to do that easily enough from what I have provided.

If you need anymore help just ask
Thanks that is excellent, but unfortunately I am not familiar with VB! So it is a bit more work than I can probably acheive. My skills are currently limited to formulas in excel!
__________________
All things are subject to interpretation whichever interpretation prevails at a given time is a function of power and not truth. - Friedrich Nietzsche
Reply With Quote
  #6  
Old 1st November 2006, 10:36 AM
Manix's Avatar
Manix Manix is offline
Get Involved!!!

Registration Date: Dec 2004
Location: UK, Hampshire
 
Posts: 489
Thanks Given to Others: 100
Thanked 82 Times in 63 Posts
Karma Power: 45
Karma: 788
Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.Manix is appreciated, and has over 700 Karma points.
Send a message via Skype™ to Manix
Default Re: Excel Formula for Ebay shop fees - Help needed

It's OK,

To simplify things I have one column working out the fee for 30 days and one column working out the fee for 90 days, using the COUNTIF function. So if 30 is entered in the duration one column does the calculation, then if 90 is enetered the next column does the calculation. I then have a third column, that uses the MAX function, to return the 30 day or 90 day insertion fee (whicheever is greater will be dictated by what is entered into the duration column, as the other will always be 0!). The first two columns are hidden and so I now have exactly what I wanted for the third column!

I hope this makes sense. Thanks to all for your input!
__________________
All things are subject to interpretation whichever interpretation prevails at a given time is a function of power and not truth. - Friedrich Nietzsche
Reply With Quote
  #7  
Old 1st November 2006, 11:17 AM
chergh chergh is offline
On Holiday

Registration Date: May 2005
Location: UK
Age: 32
 
Posts: 398
Thanks Given to Others: 6
Thanked 45 Times in 36 Posts
Karma Power: 0
Karma: 1440
chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.chergh is appreciated, and has over 1300 Karma points.
Default Re: Excel Formula for Ebay shop fees - Help needed

Heres the VBA for it anyway.

Just click on the visual basic editor button and paste the following into it then you just press the run button to get it to output.



Dim ws As Worksheet

Public Sub ebay()

Dim i As Single
Dim commi As Single

' commi is short for comission which i guess you are calculating

i = 0
commi = 0

i = [T6] * [E6]

If [F6] = 30 Then

If i <= 0 Then
commi = 0
Else

If i < 5 Then
commi = 0.03
Else

If i < 10 Then
commi = 0.05
Else

If i < 50 Then

commi = 0.07
Debug.Print commi
Else

If i < 500 Then
commi = 0.09
Else

If i >= 500 Then
commi = 0.11
End If
End If
End If
End If
End If
End If

End If

If [F6] = 90 Then
If i <= 0 Then
commi = 0
Else

If i < 5 Then
commi = 0.03
Else

If i < 10 Then
commi = 0.05
Else

If i < 50 Then

commi = 0.07

Else

If i < 500 Then
commi = 0.09
Else

If i >= 500 Then
commi = 0.11
End If
End If
End If
End If
End If
End If

End If



[A5] = commi

End Sub
Reply With Quote
  #8  
Old 1st November 2006, 11:47 AM
Tim Folkerts's Avatar
Tim Folkerts Tim Folkerts is offline
Forum Moderator

Registration Date: Sep 2003
Location: Kansas, USA
Age: 46
 
Posts: 900
Thanks Given to Others: 27
Thanked 249 Times in 150 Posts
Karma Power: 123
Karma: 3974
Tim Folkerts is appreciated, and has over 1700 Karma points.
Tim Folkerts is appreciated, and has over 1700 Karma points.Tim Folkerts is appreciated, and has over 1700 Karma points.Tim Folkerts is appreciated, and has over 1700 Karma points.Tim Folkerts is appreciated, and has over 1700 Karma points.Tim Folkerts is appreciated, and has over 1700 Karma points.Tim Folkerts is appreciated, and has over 1700 Karma points.Tim Folkerts is appreciated, and has over 1700 Karma points.Tim Folkerts is appreciated, and has over 1700 Karma points.
Default Re: Excel Formula for Ebay shop fees - Help needed

How about dividing the formula up into several cells. Have one cell calculate the result for 0<x<4.99, another cell calculate the value for 5<x<9.99 and a third cell calculate the value for x<10.

Then have a "master equation" that decides which of those to use. It takes a little more space, but you can troubleshoot each equation separately, rather than trying to get one huge equation to work. (I'm not sure I have your conditions down quite right, but you get the idea.)

If you want, you can always hide the extra columns to make it look nicer.



Tim F
__________________
To wonder is to begin to understand.
Reply With Quote
Reply

Lower Navigation Bar
Go Back   The Elsmar Cove Forum > Common Quality Assurance Processes and Tools > Quality Tools, Improvement and Analysis > Quality Assurance and Compliance Software Tools / Solutions > Excel .xls Spreadsheet Templates and Tools

Bookmarks


Visitors Currently Viewing this Thread: 1 (0 Registered Visitors and 1 Unregistered Guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Forum Search
Display Modes Rate Thread Content
Rate Thread Content:

Posting Settings
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Discussion Threads
Discussion Thread Title Thread Starter Forum Replies Last Post or Poll Vote
What is the Formula for Cpk in Excel? lee01 Excel .xls Spreadsheet Templates and Tools 38 19th August 2009 12:44 PM
Weibull formula in Excel needs to be verified. vane0326 Excel .xls Spreadsheet Templates and Tools 44 28th April 2009 10:16 AM
Need some help with a formula in Excel Please! Darren Durney Excel .xls Spreadsheet Templates and Tools 11 27th March 2009 07:33 AM
CMM Accuracy - Formula for Excel or a spreadsheet John Bumgardner Excel .xls Spreadsheet Templates and Tools 19 1st July 2008 03:57 AM
Excel formula for Ppk needed Aitch Excel .xls Spreadsheet Templates and Tools 44 1st July 2006 06:12 AM



The time now is 10:00 PM. All times are GMT -4.
The time zone can be changed in your UserCP --> Options.



   

All Y'All Come Back Now, Y' Hear?

Made With A Mac! FreeBSD OS Powered by Apache!
Using php4 Forums provided and maintained by Marc Smith Database by MySQL

FAIR USE and CORRECTNESS NOTICE: This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe herein constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes. For more information go to: http://www.law.cornell.edu/uscode/17/ If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner. In addition, I do not guarantee the correctness of the content. The risk of using content from the Elsmar Cove web site and forums remains with the user/visitor.

Responsibility Statement: Each person is responsible for anything they post in the Elsmar Cove forum. Neither I, Marc Timothy Smith, nor any of the forum Moderators, are responsible for the content of posts people make. Liability for post content resides with the poster as does interpretation and/or acceptance and/or use of advice by the reader.

Complaints: If you have a complaint with a post in a forum discussion thread, including Content in general, fighting, flaming, copyright infringement, defamation and/or 'slander', please use the 'Report This Post Report This Post Button button which appears at the top of every post in every thread.

Site courtesy of:
Marc Timothy Smith - Cayman Business Systems, 8466 Lesourdsville-West Chester Road, West Chester, Ohio 45069-1929 - USA
(513) 341-6272

To contact me, click the Google Voice link below, enter Your Name and Your Phone Number and Google will ring your phone and connect you for free!

The Elsmar Cove Web Site is *CopyFree*
no new posts