A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

More than 7 If Functions Example is IF(A2="Bongaigaon", B2*40, ..



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2010, 12:56 PM posted to microsoft.public.excel.worksheet.functions
M.Mahesh
external usenet poster
 
Posts: 1
Default More than 7 If Functions Example is IF(A2="Bongaigaon", B2*40, ..

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


  #2  
Old April 22nd, 2010, 01:06 PM posted to microsoft.public.excel.worksheet.functions
Duke Carey
external usenet poster
 
Posts: 1,027
Default More than 7 If Functions Example is IF(A2="Bongaigaon", B2*40, ..

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


  #3  
Old April 22nd, 2010, 01:13 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default More than 7 If Functions Example is IF(A2="Bongaigaon", B2*40, ..

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:

=IF(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*pm, 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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:17 AM.


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