# adding values if they occure in an array

#### Colleen45

##### Active Member
I'm having a little problem putting a formula together. firstly I'd like to check if anyvalues (text) accur in column AI19:AI1000 (these text values are in BO19:BO46), when there is a match, the formula needs to add values found in BB19:BB1000
for example if there is a match from BO19:BO46, found in AI19:AI100, it should add those values to give one total, Hope I have made sense
Thanks

### Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

#### hiker95

##### Well-known Member
Colleen45,

Excel Workbook
AIBBBOBP
19aaa1aaa111
20ab2ab7
21ac7ac12
22aaa100c19
23c3cc38
24cc33ccc305
25ccc300
26c6
27aaa5
28ab5
29ac5
30aaa5
31c5
32cc5
33ccc5
34c5
35
Sheet1

The formula in cell BP19 copied down to BP46:

=SUMIF(\$AI\$19:\$AI\$1000,\$BO19,\$BB\$19:\$BB\$1000)

#### Colleen45

##### Active Member
Hello Hiker,

Yes this will be perfect, although I need to make minor additions as there a few more variables to take into account, you've certaily hit this on the mark. Thank you so much for your help.
Kind Regards and Blessings.

#### Colleen45

##### Active Member
and of course I learnt the SUMIF function - thank you

#### hiker95

##### Well-known Member
Colleen45,

You are very welcome.

there a few more variables to take into account

Look into SUMIFS for more variables.

Replies
0
Views
143
Replies
8
Views
447
Replies
2
Views
154
Replies
5
Views
355
Replies
0
Views
509

1,191,120
Messages
5,984,759
Members
439,909
Latest member
daigoku

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