Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This should be the code Sub test() Site1Percentage = 0.7 Site1Percentage = 0.3 Site1Max = Range("G1") Site2Max = Range("G2") ProductionChange = Range("G7") If ProductionChange Site1Max + Site2Max Then Site1Increase = Site1Max Site2Increase = Site2Max Else Site1Increase = ProductionChange * Site1Percentage If Site1Increase = Site1Max Then Site1Increase = Site1Max End If Site2Increase = ProductionChange - Site1Increase If Site2Increase = Site2Max Then Site2Increase = Site2Max Site1Increase = ProductionChange - Site2Increase End If End If Range("G15") = Site1Increase Range("G16") = Site2Increase If Site1Increase = Site1Max Then Range("G15").Interior.ColorIndex = 3 End If If Site2Increase = Site2Max Then Range("G16").Interior.ColorIndex = 3 End If End Sub -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=151285 Microsoft Office Help |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Production/Inventory | New Users to Excel | |||
Production Yields | New Users to Excel | |||
forecast production | Excel Worksheet Functions | |||
Production CLock | Excel Worksheet Functions | |||
Summary of Production | Excel Discussion (Misc queries) |