Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default How do I attach a number to a cell with text to use in a formula?

I am trying to make a spreadsheet to allow for pricing. I have a dropdown box
in a cell with stock codes and I want to attach a cost to each code so I only
have to click on the code for it to be included in a formula. How can I have
the formula read a number(cost) from a text(stock code) cell?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default How do I attach a number to a cell with text to use in a formula?

Create a 2 column table with the code in the left column and the
correspsonding cost in the right column.

...........A..........B
1.....Code....Cost
2........X..........5
3........Y..........3
4........Z..........6

Let's assume your drop down list is in cell H1. From the list you select
code Y. To get the cost for code Y:

=SUMIF(A2:A4,H1,B2:B4)

Or

=VLOOKUP(H1,A2:B4,2,0)

--
Biff
Microsoft Excel MVP


"Glen" wrote in message
...
I am trying to make a spreadsheet to allow for pricing. I have a dropdown
box
in a cell with stock codes and I want to attach a cost to each code so I
only
have to click on the code for it to be included in a formula. How can I
have
the formula read a number(cost) from a text(stock code) cell?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Attach a Help Text With A UDF! FARAZ QURESHI Excel Discussion (Misc queries) 1 March 7th 09 11:13 PM
Excel Formula, text & number in cell Need a Guru Excel Discussion (Misc queries) 1 December 29th 08 10:11 PM
number and text in cell for formula paulg Excel Worksheet Functions 6 August 21st 08 04:41 PM
extract number and use in formula from text & numbers in cell ivory_kitten Excel Worksheet Functions 3 July 14th 06 05:38 AM
attach a label to number, like validation but follows the number Rickster Excel Worksheet Functions 0 February 2nd 06 08:58 PM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"