ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Looking up/Validating Info in database (https://www.excelbanter.com/excel-worksheet-functions/216497-looking-up-validating-info-database.html)

Lady Success

Looking up/Validating Info in database
 
My worksheet has two tabs. One tab is where data is entered by reviewer.
The other tab has three columns of data. I want to be able to look at the
validate that the information entered in the first tab is on the second tab
and then make a decision based upon that validation.

Tab 1 (Entered by processor)
Requested Drug: Cytoxan (Name must match description of Jcode below)
J-code: J8530 (J-code must be in database)
Diagnosis Code (ICD-9) 140.0 (ICD-9 code must be in database)


Approval Status: If Jcode and Diag code are yes, "Approve" needs to show
here. I'd like to include an add'l column that will show the outcome of the
three fields above.

Tab 2 (Database)
J-code Description
ICD-9
J8530 Cytoxan (cyclophosphamide, oral 25 mg) 140.1
J9080 Cytoxan or Neosar (cyclphosphamide 200 mg) 140.3
J9090 Cytoxan or Neosar (cyclophosphamide, 500 mg) 140.4
J9091 Cytoxan or Neosar (cyclophosphamide, 1.0 gm) 140.5

I'm just starting to work with some of the more advanced functions, so I'm
not sure which function I need to use. I don't know if it makes a difference
or not, but I have named the ranges in the database.

Any help would be appreciated.



--
Lady

Luke M

Looking up/Validating Info in database
 
I'm thinking you'll want to look he
http://www.contextures.com/xlDataVal02.html
as it sounds similar to what your wanting (I believe).

If that's not it, you could try using the MATCH function to determine if an
entry exists in your database, VLOOKUP to ensure name matches code, or
possibly a combination of the 2.
For instance to find out if both J8530 and 140.0 exist in your database (not
necessarily on the same line)

=IF(AND(ISNUMBER(MATCH(B2,databasereference1,0)),I SNUMBER(MATCH(B3,databasereference2,0))),"Validate d","Error")

databasereference refers to the exact reference of your database for code
and qty, respectively.

Hopefully, this at least gives you a direction.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Lady Success" wrote:

My worksheet has two tabs. One tab is where data is entered by reviewer.
The other tab has three columns of data. I want to be able to look at the
validate that the information entered in the first tab is on the second tab
and then make a decision based upon that validation.

Tab 1 (Entered by processor)
Requested Drug: Cytoxan (Name must match description of Jcode below)
J-code: J8530 (J-code must be in database)
Diagnosis Code (ICD-9) 140.0 (ICD-9 code must be in database)


Approval Status: If Jcode and Diag code are yes, "Approve" needs to show
here. I'd like to include an add'l column that will show the outcome of the
three fields above.

Tab 2 (Database)
J-code Description
ICD-9
J8530 Cytoxan (cyclophosphamide, oral 25 mg) 140.1
J9080 Cytoxan or Neosar (cyclphosphamide 200 mg) 140.3
J9090 Cytoxan or Neosar (cyclophosphamide, 500 mg) 140.4
J9091 Cytoxan or Neosar (cyclophosphamide, 1.0 gm) 140.5

I'm just starting to work with some of the more advanced functions, so I'm
not sure which function I need to use. I don't know if it makes a difference
or not, but I have named the ranges in the database.

Any help would be appreciated.



--
Lady


Lady Success

Looking up/Validating Info in database
 
Thank you for the response. At first, I didn't think this would work, but I
kept coming back to it and finally worked my way through it until it did
work. You pointed me in the right direction. I used a combination of both
of your suggestions. Thanks!
--
Lady


"Luke M" wrote:

I'm thinking you'll want to look he
http://www.contextures.com/xlDataVal02.html
as it sounds similar to what your wanting (I believe).

If that's not it, you could try using the MATCH function to determine if an
entry exists in your database, VLOOKUP to ensure name matches code, or
possibly a combination of the 2.
For instance to find out if both J8530 and 140.0 exist in your database (not
necessarily on the same line)

=IF(AND(ISNUMBER(MATCH(B2,databasereference1,0)),I SNUMBER(MATCH(B3,databasereference2,0))),"Validate d","Error")

databasereference refers to the exact reference of your database for code
and qty, respectively.

Hopefully, this at least gives you a direction.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Lady Success" wrote:

My worksheet has two tabs. One tab is where data is entered by reviewer.
The other tab has three columns of data. I want to be able to look at the
validate that the information entered in the first tab is on the second tab
and then make a decision based upon that validation.

Tab 1 (Entered by processor)
Requested Drug: Cytoxan (Name must match description of Jcode below)
J-code: J8530 (J-code must be in database)
Diagnosis Code (ICD-9) 140.0 (ICD-9 code must be in database)


Approval Status: If Jcode and Diag code are yes, "Approve" needs to show
here. I'd like to include an add'l column that will show the outcome of the
three fields above.

Tab 2 (Database)
J-code Description
ICD-9
J8530 Cytoxan (cyclophosphamide, oral 25 mg) 140.1
J9080 Cytoxan or Neosar (cyclphosphamide 200 mg) 140.3
J9090 Cytoxan or Neosar (cyclophosphamide, 500 mg) 140.4
J9091 Cytoxan or Neosar (cyclophosphamide, 1.0 gm) 140.5

I'm just starting to work with some of the more advanced functions, so I'm
not sure which function I need to use. I don't know if it makes a difference
or not, but I have named the ranges in the database.

Any help would be appreciated.



--
Lady



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

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