I cannot write a formula to reflect the necessary conditions relative to the cost of barricades.
0 = 0
1-4 = $20
5-20 = $31
more than 20 = $38 plus $5 for each additional barricade over 20. So 21 barricades would be $38 + $5 = $43.00 / and 22 barricades would be $38 + $10 = $48 / and 23 barricades would be $38 + $15 = $53 / etc.
Can anyone help?
Last edited by germaine; 01-17-2012 at 02:49 PM.
Try this - i put 21 in A2, the formula is in B2 -=IF(AND(A2>=1,A2<=4),20,IF(AND(A2>=5,A2<=20),31,IF(A2>20,38+((A2-20)*5),0)))
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Beautiful, but I still have one problem. Sometimes the cell will be blank because there are no barricades, this causes a problem with the formula. I have attached my spreadsheet for your review and comment. I enter the # of barricades in column E and the value in column R.
You'd better read and comply to post #3 before continuing...
Cheers - THE WARNING I RECEIVED WAS NOT JUSTIFIED
I tried my formula in your file and it works fine even if the Barricades column has blanks in some rows.
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Thank you, you are absolutely right and I appreciate your help more than you know. I was a bit intimidated to come back to the forum because I was scolded for not posing the question correctly.
Actually, its not a scolding. Everyone is trying to keep the forum neat & clean. So its just a warning to ensure we dont do the wrong thing.
Feel free to come back anytime. You will surely get the best of responses at the fastest of speed.
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks