[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 578
  • Last Modified:

Convert a column value to a number

Hi,

I have a spreadsheet with a column that contains either A, B or C (or blank).

I want to make a sum in the bottom of the column that awards 3 for an A, 2 for a B and 1 for a C, 0 for blank...

Is that possible?

tnx
~j
0
prosit
Asked:
prosit
  • 2
  • 2
1 Solution
 
redmondbCommented:
Hi, funch.

Assuming that the cells you're interested in are A1:A10...
=3*COUNTIF(A1:A10,"A")+ 2*COUNTIF(A1:A10,"B")+COUNTIF(A1:A10,"C")

Regards,
Brian.
0
 
prositAuthor Commented:
problem is that they are not...

they are a spreadsheet with hidden rows, so it would be row 56, 75,90 etc. on one, but different on another...

any ideas on that... worst case scenario I can delete the rows, it's not the end of the world...

`j
0
 
prositAuthor Commented:
Actually it worked, I just added the max number of rows and it worked...

tnx a bunch
~j
0
 
redmondbCommented:
Thanks, funch.

As you've discovered, the formula doesn't care whether the rows are hidden or not. That's fine - unless you want to exclude A/B/C values in the hidden rows.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now