Formula To Calculate Combinations

honkin

Active Member
Joined
Mar 20, 2012
Messages
374
Office Version
  1. 2016
Platform
  1. MacOS
I need to put a formula together which does the following, but am struggling.

Here is what is required.

Columns U, V & W have either an X or are blank. I want to put the result of varying combinations of the Xs in another column.

So In English, IF W2 =X, then the result will be x. If U2 & V2 both have an X, the result will be **, otherwise the result will be *

Just to clarify, if there is an X in column W, the will never be an X in U or V. If there is an X in either U or V, there will never be an X in W.

Only 3 possibly scenarios exist

1) U2=X, V2=X, W2=Blank - Result =**
2) U2=X, V2=Blank, W2=Blank - Result = *
3) U2=Blank, V2=Blank, W2=X - Result = x

I tried starting with
VBA Code:
=IF(W2="X",x,IF(AND(U2="X",V2="X"),"**","*"))
but the result gives me #NAME? I thought this was saying IF W2 = "X" put x, IF U2="X" AND V2="X" then put "**", otherwise put "*"

Any help gladly accepted

cheers
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
The lower case x needs quote marks around it. If(W2="X","x" .....
 
Upvote 0
ah cheers JoeMo. Had looked at it for so long and just couldn't see it.

Thanks again
 
Upvote 0
You are welcome - thanks for the reply.
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,055
Latest member
excelhelp12345

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