[FONT="]I have a situation where I have 3 different categories but 4 different formulas.[/FONT]
[FONT="]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="]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="]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="] [/FONT]
[FONT="]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="]Here are the formulas I use individually:
=(B13&” Dogs(s): “&C13&””)[/FONT]
[FONT="]=(B14&” Dog(s): “&C14&” / “&D14&” Cat(s): “&E14&””)[/FONT]
[FONT="]=(B15&” Dog(s): “&C15&” / “&F15&” Fish(s): “&G15)[/FONT]
[FONT="]=(B16&” Dog(s): “&C16&” / “&D16&” Cat(s): “&E16&” / “&F16&” Fish(s): “&G16)[/FONT]
[FONT="]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="]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="]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="] [/FONT]
[FONT="]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="]Here are the formulas I use individually:
=(B13&” Dogs(s): “&C13&””)[/FONT]
[FONT="]=(B14&” Dog(s): “&C14&” / “&D14&” Cat(s): “&E14&””)[/FONT]
[FONT="]=(B15&” Dog(s): “&C15&” / “&F15&” Fish(s): “&G15)[/FONT]
[FONT="]=(B16&” Dog(s): “&C16&” / “&D16&” Cat(s): “&E16&” / “&F16&” Fish(s): “&G16)[/FONT]