Excel help with IF, AND Statements

MsplcdYkee69

New Member
Joined
Aug 5, 2011
Messages
3
I am having to check user input in two different cells. Example Code below:

IF(P8="","",IF(AND($C$12=25;P8<($C$22-Y5)),(P8+25),IF(AND($C$12=50;P8<($C$22-Y5)),(P8+50),IF(AND($C$12=75;P8<($C$22-Y5)),(P8+75),IF(AND($C$12=100;P8<($C$22-Y5)),(P8+100),$C$22)))))

P8 = The previous cell to see if it has a value
C12 = User defined input of either= 25, 50, 75, or 100
C22 is a tabulated value and I do not want to exceed this value.

Example:
P7 = 813.65
P8 = Rounds P7 to next User defined integer of ( 25, 50, 75, or 100)
P9 = (Cell the code listed above references) This cell needs to round

P7 = 813.65
P8 = 825.00
P9 = 850.00
P10 = 900.00
P11 = 925.00
P12 = 948.25 (Value in C22)

What I am doing is coming up with Station Values for roadway design.

Any help would be appreciated...
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Put this formula in P8 and copy down:

Excel Workbook
CDP
7813.65
8825.00
9850.00
10875.00
11900.00
1225925.00
13948.25
14
22948.25
Sheet1
 
Upvote 0
Thanks for the help that did the trick...

I just had to tweak it to fit into my formula and add 2 IF statements... I appreciate it a lot...

=IF(N8="","",IF(N8<$C$22,(MIN($C$22, CEILING(N8+0.01,$C$12))),""))


thanks again
 
Upvote 0
I don't think you needed the second IF addition, the MIN(CEILING()) function did that already.
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,462
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top