Data Analysis - 2 Steps?

Karein

New Member
Joined
Sep 25, 2017
Messages
6
[FONT=&quot]I have a situation where I have 3 different categories but 4 different formulas.[/FONT]
[FONT=&quot]For example, let’s say my categories are Dogs, Cats, and Fish. I will always have Dogs. Sometimes with the Dogs I’ll have Cats; sometimes I’ll have Fish with my Dogs, and sometimes I’ll have Cats AND Fish with my Dogs. And the numbers vary with all of my stock.[/FONT]
[FONT=&quot]I need to have a formula where #1 it recognizes what’s in the group (Dogs, Dogs/Cats, Dogs/Fish, Dogs/Cats/Fish), then I need that formula to add each category.[/FONT]
[FONT=&quot]Here’s an example: The 6 left columns are my working columns where I manually type the number and type of livestock, and the FORMULA column is what I need the formula to give me.[/FONT]
[TABLE="width: 626"]
<colgroup><col width="17" style="width: 13pt;"><col width="85" style="width: 64pt;"><col width="17" style="width: 13pt;"><col width="48" style="width: 36pt;"><col width="17" style="width: 13pt;"><col width="49" style="width: 37pt;"><col width="64" style="width: 48pt;"><col width="329" style="width: 247pt;"></colgroup><tbody style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; vertical-align: baseline;">[TR]
[TD="class: xl71, width: 102, colspan: 2"]DOGS[/TD]
[TD="class: xl71, width: 65, colspan: 2"]CATS[/TD]
[TD="class: xl71, width: 66, colspan: 2"]FISH[/TD]
[TD="width: 64"] [/TD]
[TD="class: xl76, width: 329"]FORMULA:[/TD]
[/TR]
[TR]
[TD="class: xl72"]3[/TD]
[TD="class: xl73"]Poodle[/TD]
[TD="class: xl74"] [/TD]
[TD="class: xl75"] [/TD]
[TD="class: xl74"] [/TD]
[TD="class: xl75"] [/TD]
[TD] [/TD]
[TD="class: xl77"]3 Dog(s): Poodle[/TD]
[/TR]
[TR]
[TD="class: xl68"]2[/TD]
[TD="class: xl69"]Snauzer[/TD]
[TD="class: xl70"]2[/TD]
[TD="class: xl71"]Tabby[/TD]
[TD="class: xl70"] [/TD]
[TD="class: xl71"] [/TD]
[TD] [/TD]
[TD="class: xl77"]2 Dog(s): Snauzer / 2 Cat(s): Tabby[/TD]
[/TR]
[TR]
[TD="class: xl68"]5[/TD]
[TD="class: xl69"]Bloodhound[/TD]
[TD="class: xl70"] [/TD]
[TD="class: xl71"] [/TD]
[TD="class: xl70"]1[/TD]
[TD="class: xl71"]Guppy[/TD]
[TD] [/TD]
[TD="class: xl77"]5 Dog(s): Bloodhound / 1 Fish(s): Guppy[/TD]
[/TR]
[TR]
[TD="class: xl68"]1[/TD]
[TD="class: xl69"]Poodle[/TD]
[TD="class: xl70"]4[/TD]
[TD="class: xl71"]Calico[/TD]
[TD="class: xl70"]1[/TD]
[TD="class: xl71"]Guppy[/TD]
[TD] [/TD]
[TD="class: xl77"]1 Dog(s): Poodle / 4 Cat(s): Calico / 1 Fish(s): Guppy[/TD]
[/TR]
</tbody>[/TABLE]
[FONT=&quot] [/FONT]
[FONT=&quot]I have formulas for each individual siguation, but I can’t figure out how to have Excel figure out which formula to use when.[/FONT]
[FONT=&quot]Here are the formulas I use individually:

=(B13&” Dogs(s): “&C13&””)[/FONT]

[FONT=&quot]=(B14&” Dog(s): “&C14&” / “&D14&” Cat(s): “&E14&””)[/FONT]
[FONT=&quot]=(B15&” Dog(s): “&C15&” / “&F15&” Fish(s): “&G15)[/FONT]
[FONT=&quot]=(B16&” Dog(s): “&C16&” / “&D16&” Cat(s): “&E16&” / “&F16&” Fish(s): “&G16)[/FONT]
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi. Try this:

=A2&" Dogs(s): "&B2&IF(C2<>""," / "&C2&" Cat(s): "&D2,"")&IF(E2<>""," / "&E2&" Fish(es): "&F2,"")
 
Upvote 0
[FONT=&quot]Is there any way you can help again?

Thanks to my boss, he needs one more column that (somewhat) sums things up

Here's what he's looking for.[/FONT]

[TABLE="width: 626"]
<colgroup><col width="17" style="width: 13pt;"><col width="85" style="width: 64pt;"><col width="17" style="width: 13pt;"><col width="48" style="width: 36pt;"><col width="17" style="width: 13pt;"><col width="49" style="width: 37pt;"><col width="64" style="width: 48pt;"><col width="329" style="width: 247pt;"></colgroup><tbody style="margin: 0px; padding: 0px; border: 0px; font-weight: inherit; vertical-align: baseline;">[TR]
[TD="class: xl71, width: 102, colspan: 2"]DOGS[/TD]
[TD="class: xl71, width: 65, colspan: 2"]CATS[/TD]
[TD="class: xl71, width: 66, colspan: 2"]FISH[/TD]
[TD="width: 64"] [/TD]
[TD="class: xl76, width: 329"]FORMULA:[/TD]
[/TR]
[TR]
[TD="class: xl72"]3[/TD]
[TD="class: xl73"]Poodle[/TD]
[TD="class: xl74"] [/TD]
[TD="class: xl75"] [/TD]
[TD="class: xl74"] [/TD]
[TD="class: xl75"] [/TD]
[TD] [/TD]
[TD="class: xl77"]Dogs[/TD]
[/TR]
[TR]
[TD="class: xl68"]2[/TD]
[TD="class: xl69"]Snauzer[/TD]
[TD="class: xl70"]2[/TD]
[TD="class: xl71"]Tabby[/TD]
[TD="class: xl70"] [/TD]
[TD="class: xl71"] [/TD]
[TD] [/TD]
[TD="class: xl77"]Dogs and Cats[/TD]
[/TR]
[TR]
[TD="class: xl68"]5[/TD]
[TD="class: xl69"]Bloodhound[/TD]
[TD="class: xl70"] [/TD]
[TD="class: xl71"] [/TD]
[TD="class: xl70"]1[/TD]
[TD="class: xl71"]Guppy[/TD]
[TD] [/TD]
[TD="class: xl77"]Dogs and Fish[/TD]
[/TR]
[TR]
[TD="class: xl68"]1[/TD]
[TD="class: xl69"]Poodle[/TD]
[TD="class: xl70"]4[/TD]
[TD="class: xl71"]Calico[/TD]
[TD="class: xl70"]1[/TD]
[TD="class: xl71"]Guppy[/TD]
[TD] [/TD]
[TD="class: xl77"]Dogs and Fish[/TD]
[/TR]
</tbody>[/TABLE]
[FONT=&quot] [/FONT]
[FONT=&quot]It's weird, but when all 3 categories are present, he just needs to account for the 1st and 3rd (Dogs and Fish) without mentioning the Cats... that's where I'm having the difficulty!

[/FONT]
 
Upvote 0
Thank You (again)!!

Actually, at the end of the the equation, it should read IF(D2<>""," and Cats",""), but it works!! :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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