Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting Formula
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "B10:H12" '<== change to suit Dim i As Double On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then Select Case Target.Value Case "X": i = 11.26 Case 8: i = 7.5 Case "H": i = 7.5 Case "12X": i = 11.25 Case "8X": i = 7.5 End With Me.Range("B27").Value = Me.Range("B27").Value - i End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click -- --- HTH Bob (change the xxxx to gmail if mailing direct) "santaviga" wrote in message ... Hi Folks, I'm looking for a formula for the following. Cell range for data input is B10:H12 input into these cells are variable, they a X, 8, H, 12X, 8X and some are left blank X has a value of 11.25 8 has a value of 7.5 H has a value of 7.5 12X has a value of 11.25 8X has a value of 7.5 In cell B27 the formula I require is to have 200.0 as a starting number and when I input any of the Data in the cell range it needs to subtract the equivelent value, so it will return a value of sum remaining. e.g. 192.5 will return when I input 8, 181.25 will return when I input X and so on. Can anyone Help. Regards |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting down formula | Excel Discussion (Misc queries) | |||
Counting formula | Excel Worksheet Functions | |||
Counting Formula | Excel Discussion (Misc queries) | |||
Counting formula | Excel Discussion (Misc queries) | |||
Counting Formula | Excel Worksheet Functions |