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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
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
NameVariableVariable 2Sales
KevinYesYes
TomYesYes
KevinNoNo
TomNoYes
SusanYesYes
TomNoYes
SusanNoNo
KevinYesYes

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"][/TD]

[TD="align: right"]100[/TD]
[TD="align: right"][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFF00]#FFFF00[/URL] , align: right"]150[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"][/TD]

[TD="align: right"]250[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"][/TD]

[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"][/TD]

[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"][/TD]

[TD="align: right"]125[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"][/TD]

[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]

[TD="align: right"][/TD]

[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: right"][/TD]

[TD="align: right"]50[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]H2[/TH]
[TD="align: left"]=SUMIFS(F:F,B:B,"Kevin",D:D,"Yes")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
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,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

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