You are here:

# Excel/conditional increments perpetually

Question
I was wondering if there is a way to insert incremented conditions perpetually.

For example:
I'm trying to calculate how many hours it would take for a job.

For every 20 units, it takes me 30 minutes. My current formula reads:
=IF(AND(G17<=20),"0.5",IF(AND(G17>=21,G17<=40),"1",IF(AND(G17>=41,G17<=60),"1.5",IF(AND(G17>=61,G17<=80),"2",IF(AND(G17>=81,G17<=100),"2.5",IF(AND(G17>=101,G17<=120),"3",IF(AND(G17>=121,G17<=140),"3.5","5")))))))

I cannot go beyond this many nested formulas (excel warns and does not except the formula) but I have to be able to calculate working on much, much more than 140 units.

How can I increment with 30 minutes for every 20 units I work on in one formula?

Muza:

I suggest the following...

=(ROUNDDOWN((G17-1)/20,0)+1)*0.5

This is an algebraic solution instead of using a series of IF functions.  This should work no matter what positive value you enter into G17.

If you are satisfied with this solution then I suggest making a donation to this expert by clicking the done button at the following link:

This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

#### Nathan

##### Expertise

This expert requires a donation of \$5 for questions answered (satisfaction guaranteed). Isn't \$5 a value for this experts time?
Microsoft Excel questions related to advanced formulas, Pivot Tables, filters, forms, graphs, and just about anything else (EXCEPT Visual Basic Coding/Programming and Macros, I don't answer questions in those categories).

##### Experience

I have been using spreadsheets since Lotus 1-2-3 was released.

Education/Credentials
Certified Public Accountant (CPA)