Assigning values to Excel cells

4thinthetrilogy

New Member
Joined
Sep 6, 2011
Messages
3
I'm trying to assign values to cells in an excel spreadsheet, so that if I enter say, an 'x', then this is counted as 1, in a total tally.

As a bit of background, I've got assets which I'm segmenting thematically by having each of the themes in a column. If the asset fits that segment, I want to mark it with an 'x' - each asset could fit multiple segments. Then I want to have a final column to calculate how many segments they fall in to.

Can anyone help with an approach on this?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Here are a couple options....

This formula counts non-blank cells
=COUNTA(A2:A100)

This formula counts cells containing "x"
=COUNTIF(A1:A100,"X")

Does that help?
 
Upvote 0
Great! Thank you Ron.

If I wanted to take this model up a step, how could I assign more weight to particular segments?

E.g. Any cells marked with an 'x' in column A have a weight of 1. But any cells marked with an 'x' in column B have a weight of 5.

Would I be looking at a different approach?
 
Upvote 0
Perhaps something like this:
=COUNTIF(A1:A100,"X")+COUNTIF(B1:B100,"X")*5

...or...this:
=SUMPRODUCT((A1:B100="X")*{1,5})
 
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,921
Latest member
BBQKING

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