# IF formula to calculate number of times a number appears in a range based on the next cell

1. ## IF formula to calculate number of times a number appears in a range based on the next cell

Hi,

In column A I have a list of numbers as below:

A1. 1
A2. 2
A3. 1
A4. 3
A5. 4
A6. 3
A7. 5
A8. 5

In column B I want a formula that looks at the value in Column A, for example cell A1 is the 1 value, and returns the value 2 because there are two number 1s in column A. Similarly, cell A3 will also return the 2 value.

Many Thanks

David  Register To Reply

2. ## Re: IF formula to calculate number of times a number appears in a range based on the next

In B1 use

=COUNTIF(\$a\$1:\$a\$8,a1)

copy down  Register To Reply

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1