Formula help urgent

A

Andrea D

My problem is i have a huge worksheet that has values
entered into. Each value has a Dollar amount that i am
trying to associate with it and then total those values at
the end of the row.
Example:
A=5.00
b=7.00
c=10.00

and i need to know how to write a formula in the next cell
that attributes the dollar amount with the corresponding
code in the previous cell.
Thanks
Andrea
 
D

Dave R.

If you are in a hurry for this, you should provide a clearer explanation.
You refer to a 'code' only once which isn't of much help in figuring out
what you're asking.
 
D

Dan E

Andrea,

Your question was kind of vague so I'll start with a sample
of what I assume your data looks like.

A $5.00
B $7.00
C $10.00
B $4.00
C $3.00

Then you want totals like
A $5.00
B $11.00
C $13.00

If i'm correct you can use SUMIF if your data were in
columns A and B

=SUMIF(A:A,"A",B:B)
OR
=SUMIF(A1:A1000,"A",B1:B1000)

Change the "A" to get sums for different groups

Dan E
 
S

Steve Smallman

Andrea,

not sure I understand your needs, but it appears that you have a series of
codes? and each alpha character has a unique value associated with it? and
you need to convert the alpha characters to numeric?

If so, then you can use vlookup to do your conversions. Set up a table on a
new sheet (called "Lookup" for example)with the alpha character in cloumn A,
and the numeric equivalent in column B e.g

A B
1 a 5
2 b 7
3 c 10
4 d 14.5
.....
26 z 2589.41 or whatever

now go back to your data sheet, and beside one of the codes (e.g Cell C2)
enter the formula

=vlookup(c2, 'lookup'!$A$1;$B$26, 2, false)

make it a bit easier on yourself, and use the mouse pointer to select the
table on sheet Lookup.
the Vlookup function asks Look for What, Where, Return the value from
column, and is close enough good enough.

so here we are searching for the value in cell C2 (on the current sheet), in
a table located on the Lookup Sheet and in the Range A1 to B26 (the $ signs
are there so that the range doesn't change when you copy and paste the
formula). Once the value in C2 is found in the lookup table, return the
corresponding value in the 2nd column of the table, and if you can't find
the value in C2, give me an error.

HTH

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top