formula problem!

hhamlinwright08

New Member
Joined
Oct 5, 2017
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hi all,

With reference to the example below, I have a database used for scoring vertebral deformities in fish (weird I know..).

I require a formula that will automatically recognise if the deformity region described in S2 and V2 is "Main Truncal", and if that is the case, to then SUM the # of vertebrae affected described in the adjacent cells T2 (3) and W2 (1). In this case the correct output that I am looking for is therefore 4.

Any ideas?!


<a href="http://tinypic.com?ref=2yubo5u" target="_blank"><img src="http://i63.tinypic.com/2yubo5u.jpg" border="0" alt="Image and video hosting by TinyPic"></a>
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
If say V2 was NOT 'Main Truncal', but S2 is, then you would want 3 ?
and 1 for Vice versa?

Try
=SUMIF(S2:V2,"Main Truncal",T2:W2)
 
Upvote 0
Give this formula a try...

=IF(AND(S2="Main Truncal",V2="Main Truncal"),T2+W2,"")
 
Upvote 0
Hi, thank you for the replies!

The problem I have is that some of the cells in the database are blank (see below).
The formula needs to be able to recognise and ignore blank cells, and sum the number of affected vertebrae if the correct deformity region is found in the adjacent cell.

I hope this makes sense..

<a href="http://tinypic.com?ref=2mmxugg" target="_blank"><img src="http://i65.tinypic.com/2mmxugg.jpg" border="0" alt="Image and video hosting by TinyPic"></a>
 
Upvote 0
The problem I have is that some of the cells in the database are blank (see below).
The formula needs to be able to recognise and ignore blank cells, and sum the number of affected vertebrae if the correct deformity region is found in the adjacent cell.
That picture is hard to see, but I don't see how blank cells would affect the formula I posted. Can you give an example of values in Cells S2:T2 and V2:W2 that would cause the formula I posted to fail and then tell me what you want the formula to report for those values?
 
Upvote 0
Thanks guys, this did the trick! - was inputting the formula incorrectly.
Another question, how could I adapt the formula below so that the number generated, e.g. '4' was then divided by 62?

Thanks!

=SUMIF(S187:AK187,"Main Caudal",T187:AL187)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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