Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Increasing number depending on input
Bear with me I am an Excel novice,
I am trying to figure out what formula I need to increase a number in a certain cell, in response to an input from another cell. Example: In Cell C2, If B2 equals 1, I need the number in C2 to increase by 1 ......but I also need the number in C2 not to change if another number is entered. Basically B2 will increase the numbers in other cells depending on what is entered. This is for a survey type form, and I need to track how many 1's, 2's, 3's, etc. are entered. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Increasing number depending on input
What you want can be done using COUNTIF formula =COUNTIF(B1:B100,1) will give you the count of cells equal to 1 adjust 100 to last row in your data What you can do is enter 1,2 ... in, say, cell D1, D2,... then in C1 enter =COUNTIF(B$1:B$100,D1) and copy to C2, C3 etc. "n_sabra64" wrote: Bear with me I am an Excel novice, I am trying to figure out what formula I need to increase a number in a certain cell, in response to an input from another cell. Example: In Cell C2, If B2 equals 1, I need the number in C2 to increase by 1 .....but I also need the number in C2 not to change if another number is entered. Basically B2 will increase the numbers in other cells depending on what is entered. This is for a survey type form, and I need to track how many 1's, 2's, 3's, etc. are entered. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Increasing number depending on input
"Sheeloo" wrote: What you want can be done using COUNTIF formula =COUNTIF(B1:B100,1) will give you the count of cells equal to 1 adjust 100 to last row in your data What you can do is enter 1,2 ... in, say, cell D1, D2,... then in C1 enter =COUNTIF(B$1:B$100,D1) and copy to C2, C3 etc. "n_sabra64" wrote: Bear with me I am an Excel novice, I am trying to figure out what formula I need to increase a number in a certain cell, in response to an input from another cell. Example: In Cell C2, If B2 equals 1, I need the number in C2 to increase by 1 .....but I also need the number in C2 not to change if another number is entered. Basically B2 will increase the numbers in other cells depending on what is entered. This is for a survey type form, and I need to track how many 1's, 2's, 3's, etc. are entered. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Increasing number depending on input
Unfortunately I was not clear enough, but I also need the number to not
change in C2 if another number is put in. In other words, D2 will count how many times 2 is put in B2, and E2 will count how many times 3 is put in B2, F2...... In other words B2 will change, but I need the tracking Cells to only increment when their corresponding number is entered and not to reset. I know I am not explaining this clearly enough, but I appreciate your help. "Sheeloo" wrote: What you want can be done using COUNTIF formula =COUNTIF(B1:B100,1) will give you the count of cells equal to 1 adjust 100 to last row in your data What you can do is enter 1,2 ... in, say, cell D1, D2,... then in C1 enter =COUNTIF(B$1:B$100,D1) and copy to C2, C3 etc. "n_sabra64" wrote: Bear with me I am an Excel novice, I am trying to figure out what formula I need to increase a number in a certain cell, in response to an input from another cell. Example: In Cell C2, If B2 equals 1, I need the number in C2 to increase by 1 .....but I also need the number in C2 not to change if another number is entered. Basically B2 will increase the numbers in other cells depending on what is entered. This is for a survey type form, and I need to track how many 1's, 2's, 3's, etc. are entered. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Increasing number depending on input
Hi,
You need a macro for that. Right click your sheet tab, view code and paste this in. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub If Target.Address = "$B$2" And IsNumeric(Target) Then Select Case Target.Value Case Is = 2 Range("D2").Value = Range("D2").Value + 1 Case Is = 3 Range("E2").Value = Range("E2").Value + 1 End Select End If End Sub Mike "n_sabra64" wrote: Unfortunately I was not clear enough, but I also need the number to not change in C2 if another number is put in. In other words, D2 will count how many times 2 is put in B2, and E2 will count how many times 3 is put in B2, F2...... In other words B2 will change, but I need the tracking Cells to only increment when their corresponding number is entered and not to reset. I know I am not explaining this clearly enough, but I appreciate your help. "Sheeloo" wrote: What you want can be done using COUNTIF formula =COUNTIF(B1:B100,1) will give you the count of cells equal to 1 adjust 100 to last row in your data What you can do is enter 1,2 ... in, say, cell D1, D2,... then in C1 enter =COUNTIF(B$1:B$100,D1) and copy to C2, C3 etc. "n_sabra64" wrote: Bear with me I am an Excel novice, I am trying to figure out what formula I need to increase a number in a certain cell, in response to an input from another cell. Example: In Cell C2, If B2 equals 1, I need the number in C2 to increase by 1 .....but I also need the number in C2 not to change if another number is entered. Basically B2 will increase the numbers in other cells depending on what is entered. This is for a survey type form, and I need to track how many 1's, 2's, 3's, etc. are entered. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FORMULAS THAT CAN HAVE DIFFERENT ANSWERS DEPENDING ON DATA INPUT | Excel Worksheet Functions | |||
Fill a seperate cell with info depending on the input in another c | Excel Discussion (Misc queries) | |||
Background Colour Depending On Input | Excel Discussion (Misc queries) | |||
Lock and unlock cells conditionally depending on input in another | Excel Worksheet Functions | |||
Function or number depending on input | Excel Worksheet Functions |