Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Not sure what the best function should be.
I want a function that will put a cost amount in the Cost column based on
Plan type; for example if Plan=C then cost will be 6.17 if Plan=A then cost will be 7.10. I am not sure if this should be an IF(OR) statement or some other function and how to write that function. example Item Plan Cost xxx C 6.17 xxx A xxx C xxx A xxx C Thanks in advance |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Not sure what the best function should be.
I assume that somewhere you have or can create a table of the Plans and their
associated costs. At that point I would be inclined to use a Vlookup or Index/Match formula. -- HTH... Jim Thomlinson "Jose'" wrote: I want a function that will put a cost amount in the Cost column based on Plan type; for example if Plan=C then cost will be 6.17 if Plan=A then cost will be 7.10. I am not sure if this should be an IF(OR) statement or some other function and how to write that function. example Item Plan Cost xxx C 6.17 xxx A xxx C xxx A xxx C Thanks in advance |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Not sure what the best function should be.
If you can only have A or C in the Plan column, then this would be
simple: =IF(B2="C",6.17,7.1) and you could extend this quite easily if you had a few more acceptable values. If there is some relationship between the Plan value and the Cost value, then you could calculate it. However, if you had more variables in the Plan column, then you could think about building up a 2-column table somewhere that had the Cost associated with each variable, and then you could use VLOOKUP. Hope this helps. Pete On Sep 23, 4:24*pm, Jose' wrote: I want a function that will put a cost amount in the Cost column based on Plan type; for example if Plan=C then cost will be 6.17 if Plan=A then cost will be 7.10. * I am not sure if this should be an IF(OR) statement or some other function and how to write that function. example *Item * *Plan * *Cost *xxx * * C * * * * * * *6.17 * * *xxx * * A * * * *xxx * * C * * * *xxx * * A * * * *xxx * * C * * * Thanks in advance |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Not sure what the best function should be.
Hi,
One way. Change the values to suit =LOOKUP(B2,{"A","B","C","D"},{1.5,2.5,3.7,4.9}) In practice you could use cell references for the values =LOOKUP(B3,{"A","B","C","D"},$K$1:$K$4) Mike Mike "Jose'" wrote: I want a function that will put a cost amount in the Cost column based on Plan type; for example if Plan=C then cost will be 6.17 if Plan=A then cost will be 7.10. I am not sure if this should be an IF(OR) statement or some other function and how to write that function. example Item Plan Cost xxx C 6.17 xxx A xxx C xxx A xxx C Thanks in advance |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Not sure what the best function should be.
Thanks Jim:
Yes, I guess I could do it that way, because I only have two cost I am dealing with 6.17 and 7.10 - I thought it would be more efficient to write a formula. Jose' "Jim Thomlinson" wrote: I assume that somewhere you have or can create a table of the Plans and their associated costs. At that point I would be inclined to use a Vlookup or Index/Match formula. -- HTH... Jim Thomlinson "Jose'" wrote: I want a function that will put a cost amount in the Cost column based on Plan type; for example if Plan=C then cost will be 6.17 if Plan=A then cost will be 7.10. I am not sure if this should be an IF(OR) statement or some other function and how to write that function. example Item Plan Cost xxx C 6.17 xxx A xxx C xxx A xxx C Thanks in advance |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Not sure what the best function should be.
Pete... EXCELLENT... This is what I was looking for... THANK YOU !!!
Jose -- So many spreadsheets and so little time. ----- Jose'' "Pete_UK" wrote: If you can only have A or C in the Plan column, then this would be simple: =IF(B2="C",6.17,7.1) and you could extend this quite easily if you had a few more acceptable values. If there is some relationship between the Plan value and the Cost value, then you could calculate it. However, if you had more variables in the Plan column, then you could think about building up a 2-column table somewhere that had the Cost associated with each variable, and then you could use VLOOKUP. Hope this helps. Pete On Sep 23, 4:24 pm, Jose' wrote: I want a function that will put a cost amount in the Cost column based on Plan type; for example if Plan=C then cost will be 6.17 if Plan=A then cost will be 7.10. I am not sure if this should be an IF(OR) statement or some other function and how to write that function. example Item Plan Cost xxx C 6.17 xxx A xxx C xxx A xxx C Thanks in advance |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Not sure what the best function should be.
You're welcome, Jose - thanks for feeding back.
Pete On Sep 23, 4:46*pm, Jose'' wrote: Pete... * EXCELLENT... This is what I was looking for... * THANK YOU !!! Jose -- So many spreadsheets and so little time. * * ----- Jose'' "Pete_UK" wrote: If you can only have A or C in the Plan column, then this would be simple: =IF(B2="C",6.17,7.1) and you could extend this quite easily if you had a few more acceptable values. If there is some relationship between the Plan value and the Cost value, then you could calculate it. However, if you had more variables in the Plan column, then you could think about building up a 2-column table somewhere that had the Cost associated with each variable, and then you could use VLOOKUP. Hope this helps. Pete On Sep 23, 4:24 pm, Jose' wrote: I want a function that will put a cost amount in the Cost column based on Plan type; for example if Plan=C then cost will be 6.17 if Plan=A then cost will be 7.10. * I am not sure if this should be an IF(OR) statement or some other function and how to write that function. example *Item * *Plan * *Cost *xxx * * C * * * * * * *6.17 * * *xxx * * A * * * *xxx * * C * * * *xxx * * A * * * *xxx * * C * * * Thanks in advance- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions |