Hi everyone,
So I'm new here. But I was wondering if someone could help me with a quick question for Excel 2010.
In my spreadsheet, I have hundreds of patients listed as first name in column A and last name in column B. Each patient has their own 6 letter/numerical ID in column C, first date of visit recorded in column E and date of the tests they are subjugated to in column F. What I want to do is have excel either search column A and B for new values( or search column C), then based on the occurences of these values, calculate how many days the patient has been in treatment(basically subtracting the first visit date from each test date to give the number of days in between the two).
Each patient has multiple entries for the test data information and we add a lot of data constantly. Previously we had just been subtracting the column E from column F but when we add a lot of information this becomes a hassle to go back and fix. I've tried things similar to this to no avail:
The problem I'm having with my code is doing an inquiry to find a patients code and then using the row that the information is found in to calculate the amount of treatment days(E from F) for that same row. I have been using their last name or ID's to search for their specific name/ID but it would be nice if the progam could just find a new value in the ID column and calculate the time in RX for that patient.
Since I realize what I just said might only make sense to me, I've attatched a WorkSample that is obviously much smaller than the sample I'm working with. The sample has the correct amount of time already in column G(where the output is going), I just need to automate it somehow base on the above. Sorry for the inconvenience and thank you ahead of time for the support :D
Bookmarks