Hi All, Trying to get a formaula to calculate multiple calculations

Kirsty Cretney

New Member
Joined
Dec 12, 2014
Messages
8
I currently have the following =SUM(IF(Q35="y1","2","0")) which works fine but the problem is I need to do the same with all of the following -

If Y2 then +4
If Y3 then +6
If Y4 then +8

And just to make it that little bit more difficult I then need If N1 then -2 and so on. Is this possible or am I living in a dream? :confused:
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I doesn't get why you have to use SUM
the formula:
=SUM(IF(Q35="y1","2","0"))
will return the same result as :
=
IF(Q35="y1","2","0")

Are you referring to some thing else ?
 
Upvote 0
Thanks for the replies. I currently have this -

=IF(Q35="y1",2,IF(Q35="y2",4,IF(Q35="y3",6,IF(Q35="y4",8) it's not working

I've tried it with this - =IF((Q35="y1",2)IF(Q35="y2")4IF(Q35="y3",6)IF(Q35="y4",8)) doesn't work

Please help, I have no excel knowledge what so ever.

Thanks
 
Upvote 0
why not try this:

=right(Q35,1)*2

A different tack, but at least returns the answers you propose.

and to make you're own formula work you could use this: =IF(Q35="y1",2,IF(Q35="y2",4,IF(Q35="y3",6,IF(Q35="y4",8,""))))
 
Last edited:
Upvote 0
Thanks, finally got it to work, full calc =IF(Q35:AC35="y1",2,IF(Q35:AC35="y2",4,IF(Q35:AC35="y3",6,IF(Q35:AC35="y4",8,IF(Q35:AC35="n1",-2,IF(Q35:AC35="n2",-4,IF(Q35:AC35="n3",-6,IF(Q35:AC35="n4",-8))))))))

Another question, if the cell has a 0 in it can I add this into the formula as well? I tried =IF(Q35:AC35="y1",2,0,IF - but it says there are too many arguments
 
Upvote 0
Try this simplified version:

=IF(LEFT(Q35,1)="N",-1,1) * RIGHT(Q35,LEN(Q35)-1)*2

(I think the Q35:AC35 only returns the top left cell value so the :AC35 isn't needed)
 
Upvote 0
Try this simplified version:

=IF(LEFT(Q35,1)="N",-1,1) * RIGHT(Q35,LEN(Q35)-1)*2

(I think the Q35:AC35 only returns the top left cell value so the :AC35 isn't needed)

Hi Peter

I'm sorry I don't get the above, I need the formula to calculate across 12 columns, and for them possibly to add in a number of different scores but also some of them are going to be blank. I need it to autocalculate to ensure the figures I pull are correct and it'll be easier for the team members.

So from column Q-AC I need them to be able to put in either Y1 for 2 points and n1 to -2 points but the field might also be N/A or 0 or blank whichever is easiest for the formula.

As I said I'm not Excel wise at all so getting confused.

Many Thanks
 
Upvote 0
Hi Kirsty,

I'm confused. I can only make your formula work if I enter it as an Array formula: press CTRL-SHFT-Enter to enter the formula and it then has {} at either end. If I don't do this it returns #value.

Can you provide a sample row of data with the expected output - I think this is entirely doable, but need more detail.

Regards
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

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