# Microsoft Office Application Help - Excel Help forum > Excel General >  >  Greater than but less than

## Janie

Hi,
I am trying to write a formula that says if numbers in a column are greater than 13 but less than 20. I can't seem to figure it out. Can someone help me?

Actually I am trying to say countif numbers in column are greater than 13 but less than 20. sorry for the confusion.
Thanks

----------


## NBVC

You mean..

=if(And(A1>13,A1<20),do_this,do_that)

----------


## LuisG

Im having a very similar issue, I want a cell to do the following. If cell it's pulling from is positive spit that cells value by 50% and display in said cell, if negative do not split and display cell value in the cell with the formula... 

So for ex. I think I am saying cell D19 is a negative number don't split and provide said neg. the value on  cell D20, however, if positive please split and report back 50% of the value of D19 on D20.

For that same formula, I want it to also include to subtract the total from D21 only if D 21 is negative number however if d21 is positive don't include it in the total that will be reporting into D20.

I figured it would be a IFD19>0 type formula but I am stuck!

----------


## sandy666

LuisG, Unfortunately _your post does not comply with Rule 2 of our Forum_ RULES. *Do not post a question in the thread of another member -- start your own thread.* 

If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread. 

Old threads are often only monitored by the original participants.  New threads not only open you up to all possible participants again, they typically get faster response, too.

----------


## mehmetcik

Enter formula using Ctrl Shift and Enter



```
Please Login or Register  to view this content.
```




This Also works


Enter formula using Enter


```
Please Login or Register  to view this content.
```

----------


## johnnymac

Janie,

A COUNTIFs function would work here.  They are a little tricky in that they use text values which can be concatenated with cell references, but for fixed numbers write it this way using quotes

=COUNTIFS(A1:A1000, ">13", A1:A1000, "<20")

Using whatever range your data is in in place of A1:A1000.  In this case both conditions must be true.  I have tried doing this with AND and OR functions, but without much success.

----------

