Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FORMULAS THAT CAN HAVE DIFFERENT ANSWERS DEPENDING ON DATA INPUT Dawn Excel Worksheet Functions 4 December 21st 06 10:59 PM
Fill a seperate cell with info depending on the input in another c Nevermore Excel Discussion (Misc queries) 2 November 14th 06 11:33 PM
Background Colour Depending On Input Macca Excel Discussion (Misc queries) 1 April 30th 06 01:05 AM
Lock and unlock cells conditionally depending on input in another Frustrated Excel Worksheet Functions 1 November 11th 05 03:36 PM
Function or number depending on input Jan Jansens Excel Worksheet Functions 7 September 7th 05 12:40 PM


All times are GMT +1. The time now is 07:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"