Using the IF function to recreate a whole row

HHML1

New Member
Joined
Dec 31, 2014
Messages
7
Hi, I've tried to make this as clear as I can:

Hs2qPg7.png


(link if the image doesn't work> https://i.imgur.com/Hs2qPg7.png)

Riiiight, so here's what I need to do.
I need to keep a running total of the performance of our salespeople (the ones in the B column) - How many leads they've been assigned, how many of those variables they have against them and how many sales they have generated.

The stats need to be 'live' as the list of customers is added to this spreadsheet all day.

It's easy enought to use the COUNTIF function to work out how many leads each salesperson has been assigned to, but I cannot work out how to fill out the rest of the values.

Is it possible to tell Excel, for example, if column B features "Kevin" to add up all of the sales in those "Kevin" rows in the F column?
I've toyed with text filters to only show the rows featuring "Kevin" rows, the COUNTIF function doesnt work with filtered data.

Is it possible to apply a formula in a new worksheet that says if B2 contains "Kevin", to print the whole row into this new worksheet?
That way I can use all the functions I need to generate the real time stats I need to report on.

Any help would be appreciated!
Sorry If I'm not 100% clear.

Thanks.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi, it sounds like you want SUMIFS() or COUNTIFS()

For example, this sums column F where column B = Kevin and column D = Yes.


Excel 2013/2016
BCDEFGH
1NameVariableVariable 2Sales
2KevinYesYes100150
3TomYesYes250
4KevinNoNo0
5TomNoYes0
6SusanYesYes125
7TomNoYes0
8SusanNoNo0
9KevinYesYes50
Sheet1
Cell Formulas
RangeFormula
H2=SUMIFS(F:F,B:B,"Kevin",D:D,"Yes")
 
Upvote 0
Hi, it sounds like you want SUMIFS() or COUNTIFS()

For example, this sums column F where column B = Kevin and column D = Yes.

Excel 2013/2016
BCDEFGH
1NameVariableVariable 2Sales
2KevinYesYes100150
3TomYesYes250
4KevinNoNo0
5TomNoYes0
6SusanYesYes125
7TomNoYes0
8SusanNoNo0
9KevinYesYes50

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
H2=SUMIFS(F:F,B:B,"Kevin",D:D,"Yes")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
Ah!

I've never used COUNTIFS or SUMIFS. That's exactly what I was looking for.

I've just played around a bit and I think I can build exactly what I need with them!
Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,011
Members
449,204
Latest member
tungnmqn90

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?

Disable AdBlock

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
Back
Top