Extremely Challenging LOGIC formula Help Request

nhbartos

Board Regular
Joined
May 23, 2015
Messages
148
Hi folks,

This one may be tough, if possible at all.

I have my file here if you need it: RSC Billing Template_8-23-17_Test.xlsm - Google Drive

The formula I need is going to be in the H column, Insurance Company, from H6, down to row 500.

I am not sure you can do this with so many ' variables', but here it is...

Formula for H6:

If...
Student 1 is in cell A6, Look for Student 1 in column J.
If student 1 is in column J, insert contents of column K (same row), into column H (same row).
If student 1 is in columns J, insert contents of column L (same row), into column F (same row).

If...
Student 2 is in cell A6, Look for Student 2 in column J.
If student 2 is in column J, insert contents of column K (same row), into column H (same row).
If student 2 is in columns J, insert contents of column L (same row), into column F (same row).

If...
Student 3 is in cell A6, Look for Student 3 in column J.
If student 3 is in column J, insert contents of column K (same row), into column H (same row).
If student 3 is in columns J, insert contents of column L (same row), into column F (same row).

etc...

There can be up to 200 students listed in column J, from J6:J205.

If there is no student name in column A, columns F and H should be blank.

Vince
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
It's basically a VLOOKUP formula.

In F6:
=IFERROR(T(VLOOKUP(A6,$J$6:$N$37,3,0)),"")

In H6:
=IFERROR(VLOOKUP(A6,$J$6:$N$37,2,0),"")

Copy down.


Excel 2010
ABCDEFGHIJKLMN
5Child (Student Name)Therapist NameStart TimeEnd TimeSession MinutesCPT CodeBillable UnitsInsurance CompanyList Student Names HereInsurance Company x-refList CPT Codes HereList CPT Code MinutesCPT Code Unit
6Student 1T18/17/2017 9:00:00 AM8/17/2017 10:00:00 AM60.00H20194.00AnthemStudent 1AnthemH2019151
7Student 2T28/17/2017 10:00:00 AM8/17/2017 11:00:00 AM60.00H20204.00AnthemStudent 2AnthemH2020151
8Student 3T38/17/2017 11:00:00 AM8/17/2017 12:00:00 PM60.00H20204.00OptimaStudent 3OptimaH2020301
9Student 4T48/17/2017 12:00:00 PM8/17/2017 1:00:00 PM60.00H20212.00MedicaidStudent 4MedicaidH2021301
10Student 5T58/17/2017 1:00:00 PM8/17/2017 1:30:00 PM30.00AnthemStudent 5Anthem
11Student 6T68/17/2017 12:00:32 PM8/17/2017 12:30:37 PM30.08OptimaStudent 6Optima
12Student 7T78/17/2017 12:30:00 PM8/17/2017 1:00:00 PM30.00MedicaidStudent 7Medicaid
13Student 8T88/17/2017 1:00:00 PM8/17/2017 2:00:00 PM60.00AnthemStudent 8Anthem
14Student 9T98/17/2017 2:00:00 PM8/17/2017 3:00:00 PM60.00OptimaStudent 9Optima
15Student 10T108/17/2017 12:00:00 PM8/17/2017 12:30:00 PM30.00MedicaidStudent 10Medicaid
16Student 11T18/17/2017 12:30:00 PM8/17/2017 1:00:00 PM30.00AnthemStudent 11Anthem
17Student 12T28/17/2017 1:00:00 PM8/17/2017 2:00:00 PM60.00OptimaStudent 12Optima
18Student 13T38/17/2017 2:00:00 PM8/17/2017 3:00:00 PM60.00MedicaidStudent 13Medicaid
19Student 14T48/17/2017 10:00:00 AM8/17/2017 11:00:00 AM60.00MedicaidStudent 14Medicaid
20Student 15T58/17/2017 11:00:54 AM8/17/2017 12:00:00 PM59.10AnthemStudent 15Anthem
21Student 16T68/17/2017 12:00:00 PM8/17/2017 12:30:00 PM30.00AnthemStudent 16Anthem
22Student 17T78/17/2017 12:30:00 PM8/17/2017 1:00:00 PM30.00AnthemStudent 17Anthem
23Student 18T88/17/2017 1:00:00 PM8/17/2017 2:00:00 PM60.00AnthemStudent 18Anthem
24Student 19T98/17/2017 9:00:00 AM8/17/2017 10:00:00 AM60.00OptimaStudent 19Optima
25Student 20T108/17/2017 10:00:00 AM8/17/2017 11:00:00 AM60.00MedicaidStudent 20Medicaid
26Student 21T18/17/2017 11:00:00 AM8/17/2017 12:00:00 PM60.00AnthemStudent 21Anthem
27Student 22T28/17/2017 9:00:00 AM8/17/2017 10:00:00 AM60.00AnthemStudent 22Anthem
28Student 23T38/17/2017 10:00:00 AM8/17/2017 11:00:00 AM60.00OptimaStudent 23Optima
29Student 24T48/17/2017 11:00:08 AM8/17/2017 12:00:12 PM60.07MedicaidStudent 24Medicaid
30Student 25T58/17/2017 12:00:00 PM8/17/2017 1:00:00 PM60.00AnthemStudent 25Anthem
31Student 26T68/17/2017 1:00:00 PM8/17/2017 2:00:00 PM60.00AnthemStudent 26Anthem
32Student 27T78/17/2017 9:00:00 AM8/17/2017 10:00:00 AM60.00OptimaStudent 27Optima
33Student 28T88/17/2017 10:00:00 AM8/17/2017 11:00:00 AM60.00MedicaidStudent 28Medicaid
34Student 29T98/17/2017 11:00:00 AM8/17/2017 11:30:00 AM30.00AnthemStudent 29Anthem
35Student 30T108/17/2017 11:30:00 AM8/17/2017 12:00:00 PM30.00AnthemStudent 30Anthem
36Student 31T18/17/2017 12:00:00 PM8/17/2017 1:00:00 PM60.00OptimaStudent 31Optima
37Student 32T28/17/2017 1:00:00 PM8/17/2017 2:00:00 PM60.00MedicaidStudent 32Medicaid
Step 1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top