i want to use if Command in which 19 times If Function to be used for Example of the Function is =IF(A2="Bongaigaon", B2*40, IF(A2="Dhemaji", B2*100, IF(A2="Dhubri", B2*50, IF(A2="Dibrugarh", B2*65, IF(A2="Golaghat", B2*50, IF(A2="Guwahati", B2*20, IF(A2="hojai", B2*50, IF(A2="Jorhat", B2*60, If(A2="Kharupetia", B2*50, up to 19 times

0 |

4/22/2010 11:56:01 AM

Hi - You really need to create a table with the 19 names in one column and, in the column to the right, the vaues associated with each name. That would enable you to use the VLOOKUP() function instead of the nested IF()s. Say you create the 2 column table and name that range NamesValues, you could then use =VLOOKUP(A2,NamesValues,2,0)*B2 That's all you need "M.Mahesh" wrote: > i want to use if Command in which 19 times If Function to be used for Example > of the Function is > > =IF(A2="Bongaigaon", B2*40, IF(A2="Dhemaji", B2*100, IF(A2="Dhubri", B2*50, > IF(A2="Dibrugarh", B2*65, IF(A2="Golaghat", B2*50, IF(A2="Guwahati", B2*20, > IF(A2="hojai", B2*50, IF(A2="Jorhat", B2*60, If(A2="Kharupetia", B2*50, > up to 19 times > >

0 |

4/22/2010 12:06:02 PM

Set up a table like this in two columns: Bongaigaon 40 Dhemaji 100 Dhubri 50 Dibrugarh 65 Golaghat 50 Guwahati 20 hojai 50 Jorhat 60 Kharupetia 50 and so on. Suppose this is in cells X1:Y19. Then you can use this formula: =3DIF(ISNA(VLOOKUP(A2,X$1:Y$19,2,0)),0,VLOOKUP(A2,X$1:Y$19,2,0))*B2 Hope this helps. Pete On Apr 22, 12:56=A0pm, M.Mahesh <M.Mah...@discussions.microsoft.com> wrote: > i want to use if Command in which 19 times If Function to be used for Exa= mple > of the Function is > > =3DIF(A2=3D"Bongaigaon", B2*40, IF(A2=3D"Dhemaji", B2*100, IF(A2=3D"Dhubr= i", B2*50, > IF(A2=3D"Dibrugarh", B2*65, IF(A2=3D"Golaghat", B2*50, IF(A2=3D"Guwahati"= , B2*20, > IF(A2=3D"hojai", B2*50, IF(A2=3D"Jorhat", B2*60, If(A2=3D"Kharupetia", B2= *50, > up to 19 times

0 |

4/22/2010 12:13:27 PM