# Sumif of a range i.e between account codes 100 - 500

1. ## Sumif of a range i.e between account codes 100 - 500

I am looking to use the sumif function for to sum the values of the codes between a specific full range.

I have simplified this example, but the information comes from an accounts code structure. It is an I&E with an slighly unstructured coding format.

I have a list of codes column A, and a list of values column B.

A B
1 50
2 150
3 200
4 150
5 149
6 132

I want to add up all of column B, between the range 2 to 5.

2. ## Re: Sumif of a range i.e between account codes 100 - 500

Hello & Welcome to the Forum,

Try

=SUMIFS(B1:B6,A1:A6,">2",A1:A6,"<5")

or

if you want to use a reference for the ranges...

=SUMIFS(B1:B6,A1:A6,">"&D1,A1:A6,"<"&E1)

D1 >> 2
E1 >> 5

3. ## Re: Sumif of a range i.e between account codes 100 - 500

Thanks, can this be acheived by linking into a cell instead of saying ">2", can I select a cell so that the amending the accounts code can be flexible. Tried referencing a cell, but no joy???

4. ## Re: Sumif of a range i.e between account codes 100 - 500

You didn't read Jeff's post fully.

He said you could use a cell reference instead of saying ">2" and showed you how to do it with this example:

=SUMIFS(B1:B6,A1:A6,">"&D1,A1:A6,"<"&E1)
D1 (or whatever cell you choose) would hold the lower value
E1 (or whatever cell you choose) would hold the higher value

5. ## Re: Sumif of a range i.e between account codes 100 - 500

Excellent, just what I was looking for thank you both.

6. ## Re: Sumif of a range i.e between account codes 100 - 500

You're welcome. Don't forget to mark your thread as Solved (click on Forum Rules @ top of page and see instructions in rule #9).

And you should click on the small star icon at the bottom left corner of Jeff's post to thank him.

#### Thread Information

##### 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