# IF Function

#### pdm15478

##### New Member
Hopefully I will Explain This Properly !!!

I am trying to use The IF function within excel.

For Example If a certain cell equals a Salespersons name then the amount they have sold which is in another cell is added to there daily,weekly totals. the reason for this is the daily sheet we use is written up as product is sold so the person that sold it is always different

hopefully I have explained this

### Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

#### Expiry

##### Well-known Member
You can use a formula called SUMIF, rather than IF. This is explained quite well in the Excel help section, but essentially the formula is written as such

=SUMIF(A1:A10,D1,B1:B10)

In this example, A1:A10, would be listed all of your sales people, in B1:B10 all of their sales, in D1, the name of the person you want a total for.

It doesn't matter of D1 appears in the range A1:A10 more than once, this formula will add together all of his/ her sales.

Hope that helps.

#### pdm15478

##### New Member
many thanks the sum works great!! it works fine for one day but if i want to do it so it sorts it by date as well as salesperson

p

Replies
1
Views
324
Replies
0
Views
480
Replies
15
Views
494
Replies
4
Views
449
Replies
15
Views
2K

1,191,196
Messages
5,985,227
Members
439,950
Latest member
Xearo96

### 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.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

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

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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