# Sum if adjacent cell is not empty

#### Paklr

##### New Member
Hi, my problem is: I have a table with values in a sheet called "Hist", imagine this:

 Michael Hepburn 90 Michael Hepburn Team A 50 Michael Hepburn Team A 10 Andrey Zeits Team B 40

<tbody>
</tbody>

And in another sheet caled "Classification" I have in A2 "Michael Hepburn", and I'd like to have in B2 the sum of all Michael Hepburn values in "Hist" when the cell next to it is not blank. In this case, the result of that sum would be 50 + 10 = 60.

### Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

#### pgc01

##### MrExcel MVP
Hi

Assuming the data in Hist!A:C, Try:

=SUMIFS(Hist!C2:C5,Hist!A2:A5,"Michael Hepburn",Hist!B2:B5,"?*")

#### ddarko77

##### New Member
Hi

Assuming the data in Hist!A:C, Try:

=SUMIFS(Hist!C2:C5,Hist!A2:A5,"Michael Hepburn",Hist!B2:B5,"?*")
Hey, thanks for posting this, quick question, what does the ?* mean? Cheers

#### pgc01

##### MrExcel MVP
... what does the ?* mean?

Hi

"?" is a wildcard for any 1 character. "*" is the wildcard for "any sequence of characters".

This means that "?*" stands for "at least 1 character".

#### ddarko77

##### New Member
Hi

"?" is a wildcard for any 1 character. "*" is the wildcard for "any sequence of characters".

This means that "?*" stands for "at least 1 character".
Aha! thanks.. good tip for me to use.. thanks again

Replies
15
Views
3K
Replies
6
Views
236
Replies
2
Views
204
Replies
1
Views
146
Replies
1
Views
177

1,196,027
Messages
6,012,948
Members
441,740
Latest member
abaz21

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