ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional Statement with Multiple Arguments (https://www.excelbanter.com/excel-worksheet-functions/97080-conditional-statement-multiple-arguments.html)

swflorida77

Conditional Statement with Multiple Arguments
 
I need help in creating formula for multiple arguments.

Column A: Lists a Number
Column B: Defines Number

For example:

CPT Description
43262 Upper Endo
43268 ERCP
45380 Colonoscopy
71020 CXR
80061 Lipid
80074 Hep Panel
80162 Dig
82105 AFP



Column C list number 43363, 43368, etc. or another number not yet
defined.

Goal: To list in Column D on the definition listed in Column B.

Please note, there are 60 numbers listed in Column A in with 60
Definitions.

Currently these are on 2 separate sheets, but I could merge them for
ease of the formula.


I tried the following with manually entering the definition for each
number...Unsuccessful.

=IF(C4=43242,"Upper
Endo",IF(C4=43268,"ERCP",IF(C4=71020,"CXR",IF(C4=7 1035,"CXR",IF(C4=80061,"Lipids",IF(C4=82378,"CEA", IF(C4=82465,"Chol",IF(C4=82728,"Fe",IF(C4=82947,"G lu",IF(C4=82977,"GTT",IF(C4=83036,"Gly
Hg",IF(C4=83540,"Iron",IF(C4=83550,"Iron
Binding",IF(C4=83700,"Lipoprotein",IF(C4=83701,"Li poprotein",IF(C4=83718,"HDL"))))))))))))))

Thanks


Paul Mathews

Conditional Statement with Multiple Arguments
 
Assuming I understand correctly, I think all you need is a vlookup (while the
descriptions in column B may not be unique, I'm assuming the numbers in
column A are unique). Let's say cell C4 contains the value 43268. You'd
like D4 to contain the result "ERCP", right? If so, set D4 to
"=VLOOKUP(C4,$A$1:$B$60,2,FALSE)" where I've assumed that your list of
numbers and definitions are in the range A1 to B60 (modify this for whatever
the actual range is or better yet give the list a range name to make it
easier to reference in the vlookup).

"swflorida77" wrote:

I need help in creating formula for multiple arguments.

Column A: Lists a Number
Column B: Defines Number

For example:

CPT Description
43262 Upper Endo
43268 ERCP
45380 Colonoscopy
71020 CXR
80061 Lipid
80074 Hep Panel
80162 Dig
82105 AFP



Column C list number 43363, 43368, etc. or another number not yet
defined.

Goal: To list in Column D on the definition listed in Column B.

Please note, there are 60 numbers listed in Column A in with 60
Definitions.

Currently these are on 2 separate sheets, but I could merge them for
ease of the formula.


I tried the following with manually entering the definition for each
number...Unsuccessful.

=IF(C4=43242,"Upper
Endo",IF(C4=43268,"ERCP",IF(C4=71020,"CXR",IF(C4=7 1035,"CXR",IF(C4=80061,"Lipids",IF(C4=82378,"CEA", IF(C4=82465,"Chol",IF(C4=82728,"Fe",IF(C4=82947,"G lu",IF(C4=82977,"GTT",IF(C4=83036,"Gly
Hg",IF(C4=83540,"Iron",IF(C4=83550,"Iron
Binding",IF(C4=83700,"Lipoprotein",IF(C4=83701,"Li poprotein",IF(C4=83718,"HDL"))))))))))))))

Thanks



swflorida77

Conditional Statement with Multiple Arguments
 
Thanks. Tested it this morning and it works perfectly!
Paul Mathews wrote:
Assuming I understand correctly, I think all you need is a vlookup (while the
descriptions in column B may not be unique, I'm assuming the numbers in
column A are unique). Let's say cell C4 contains the value 43268. You'd
like D4 to contain the result "ERCP", right? If so, set D4 to
"=VLOOKUP(C4,$A$1:$B$60,2,FALSE)" where I've assumed that your list of
numbers and definitions are in the range A1 to B60 (modify this for whatever
the actual range is or better yet give the list a range name to make it
easier to reference in the vlookup).

"swflorida77" wrote:

I need help in creating formula for multiple arguments.

Column A: Lists a Number
Column B: Defines Number

For example:

CPT Description
43262 Upper Endo
43268 ERCP
45380 Colonoscopy
71020 CXR
80061 Lipid
80074 Hep Panel
80162 Dig
82105 AFP



Column C list number 43363, 43368, etc. or another number not yet
defined.

Goal: To list in Column D on the definition listed in Column B.

Please note, there are 60 numbers listed in Column A in with 60
Definitions.

Currently these are on 2 separate sheets, but I could merge them for
ease of the formula.


I tried the following with manually entering the definition for each
number...Unsuccessful.

=IF(C4=43242,"Upper
Endo",IF(C4=43268,"ERCP",IF(C4=71020,"CXR",IF(C4=7 1035,"CXR",IF(C4=80061,"Lipids",IF(C4=82378,"CEA", IF(C4=82465,"Chol",IF(C4=82728,"Fe",IF(C4=82947,"G lu",IF(C4=82977,"GTT",IF(C4=83036,"Gly
Hg",IF(C4=83540,"Iron",IF(C4=83550,"Iron
Binding",IF(C4=83700,"Lipoprotein",IF(C4=83701,"Li poprotein",IF(C4=83718,"HDL"))))))))))))))

Thanks





All times are GMT +1. The time now is 04:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com