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]
DOGSCATSFISH FORMULA:
3Poodle 3 Dog(s): Poodle
2Snauzer2Tabby 2 Dog(s): Snauzer / 2 Cat(s): Tabby
5Bloodhound 1Guppy 5 Dog(s): Bloodhound / 1 Fish(s): Guppy
1Poodle4Calico1Guppy 1 Dog(s): Poodle / 4 Cat(s): Calico / 1 Fish(s): Guppy

<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;">
</tbody>
[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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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]

DOGSCATSFISH FORMULA:
3Poodle Dogs
2Snauzer2Tabby Dogs and Cats
5Bloodhound 1Guppy Dogs and Fish
1Poodle4Calico1Guppy Dogs and Fish

<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;">
</tbody>
[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
Like this:

="Dogs"&IF(E2<>""," and Fish",IF(C2<>""," and Cats",""))
 
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,215,425
Messages
6,124,825
Members
449,190
Latest member
rscraig11

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