# Countif Greater than a cell reference

#### beerandcrisps

##### New Member
Hi

I am carrying out what I though was a simple countif, but am having problems. On one worksheet, I have the numbers 1 to 32 in row 1. In row 2 I am trying to write a countif that refers to these numbers but obviously don't want to write it 32 times. Howevere I am having problems because the countif is a greater than or = to. For the first number, if I write =COUNTIF(Sheet2'!G:G,">=1") I get the correct answer, but if I change this to =COUNTIF(Sheet2'!G:G,">=B1") it no longer works. How do I do a countif when my >= refers to a cell reference.

Cheers

Andy

### Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

#### Jonmo1

##### MrExcel MVP
=COUNTIF(Sheet2'!G:G,">="&B1)

#### VoG

##### Legend
Try

=COUNTIF(Sheet2!G:G,">="&B1)

#### brian.wethington

##### Well-known Member
=COUNTIF(Sheet2!G:G, ">=" & B1)

Hope this helps!

#### beerandcrisps

##### New Member
Thanks all - it works great.

Knew it would be a simple one but just couldn't get my head in gear.

Cheers

Andy

Replies
1
Views
450
Replies
9
Views
208
Replies
0
Views
83
Replies
5
Views
285
Replies
4
Views
321

1,191,394
Messages
5,986,352
Members
440,018
Latest member
GolfOne

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back