count the number of visits of a client

renemwizere

New Member
Joined
May 14, 2016
Messages
5
I work in medical insurance
And I tried to use this formula to count the number of visits of a client
=IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

But in some cases the formula counts the same date as two visits instead of one

Please advice!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Re: =IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

in the UK you should normally be reporting repeat visits, it indicates that treatment may not have been effective
 
Upvote 0
Re: =IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

A client may attend different departments in a hospital the same day, that counts like one visit!
 
Upvote 0
Re: =IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

If you could explain what is in each of the B2=B1,E2=E1,F2-F1 cells then we will be able to help you.

It sounds as if the attendance date is the main criteria considering they could attend several different departments on the same day.

Uploading a worksheet would also be helpful, with sensitive data replaced obviously.

I hope this helps!
 
Upvote 0
Re: =IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

Here is the image I cut from Excel
B stands for Member Number
E stands for Provider Name
And F stands for Date
Each will get a number, say B2, respectively from the row where it is in the excel sheet
30jqwcy.jpg
[/IMG]
 
Upvote 0
Re: =IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

Give this a go...

Code:
=IF(AND(B2=B1,F2=F1),"Unique Visit","")

It's not important how many departments they visited, is it?

I hope this helps!
 
Last edited:
Upvote 0
Re: =IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

Thank for your time
I appreciate alot

But the code you proposed does not include the provider name
Which is very key to identify a visit
 
Upvote 0
Re: =IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

Try to post the sample in an Excel readable form. For providing a sample try: Attachments lists a few methods for posting sample exhibits which do not require retyping and the add-in https://app.box.com/s/soezox25h3w0q5s4rcyl is also a method for posting an exhibit (Note that an image or a link to a storage site like dropbox or onedrive etc. does not provide a permanent record.). Mind you a forum without a permanent record is not of much value.
 
Upvote 0
Re: =IFERROR(IF(AND(B2=B1,E2=E1,F2-F1<1)," ","Uniq Visit"),"Uniq Visit")

Is this any closer...

Code:
=IF(AND(B2<>B1,F2=F1,E2<>E1),CONCATENATE(B1,", ",E1,", ",TEXT((F1),"DD/MM/YYYY")," - Unique Visit"),"")

I hope this helps!
 
Upvote 0

Forum statistics

Threads
1,223,152
Messages
6,170,389
Members
452,323
Latest member
GoJones

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