Articles

Solved Assigning a value to a string

November 14, 2012 at 14:58:53
Specs: Windows XP

Hi,
I need to to assign a fixed value to "CLUB MEMBER" another different fixed number to "CLUB STATION" and yet another given value for the text "NO CLUB". These numbers would appear in another cell.
i.e Text CLUB MEMBER puts 50 in another cell. I can then add all of these for a final score. I am using Excel 2003.

I am no VB programmer but I will give it a go. Any help would be appreciated

Cheers,

Frederick


See More: Assigning a value to a string

Report •


#1
November 14, 2012 at 15:39:31

you could put the labels (eg club member) in the left most column of cells and then put your vales you the right. Like this:

col A | col B
club member | 50

Then you just sum them. In excel you click on the cell you want the total to appear in and type "=sum(B1:B3)" (no quotation marks) this assumes that your values are in cells B1, B2, and B3. You could also put "=B1+B2+B3" (no quotation marks).


Report •

#2
November 15, 2012 at 01:16:16

Can't get the voting thingy to work. Thank you for this, very helpful. I appreciate the effort.

Regards


Report •

#3
November 15, 2012 at 08:45:29
✔ Best Answer

If you have data like this, then an IF statement should work for you:

        A
1  CLUB MEMBER
2  CLUB MEMBER
3  CLUB STATION
4  NO CLUB
5  CLUB STATION

Put this in B1 and drag it down.

=IF(A1="CLUB MEMBER",50,IF(A1="CLUB STATION",40,30))

If that is not what you are looking for, please provide some more details.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
November 15, 2012 at 14:07:00

Just what I want.......thanks. Can't get the voting thing to work.

F


Report •


Ask Question