Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2018, 01:47 PM
wheddingsjr wheddingsjr is offline Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Windows 7 64bit Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Office 2016
Advanced Beginner
Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type
 
Join Date: Mar 2017
Posts: 76
wheddingsjr is on a distinguished road
Default Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type


Hello all
I have a spreadsheet with multiple columns and multiple rows. The idea is to determine if an “E&M” code was paid within 90 days of the “Intraocular” procedure for each MEMNO. The problem with the formula I tried (I tried an If/And formula), is that I cannot incorporate those “E&M” types that come BEFORE the “Intraocular” procedure. I am including a sample to show as an example of how I would like the formula to work. Any assistance would be greatly appreciated.
Thanks

Last edited by wheddingsjr; 10-16-2018 at 12:12 PM.
Reply With Quote
  #2  
Old 10-16-2018, 02:43 AM
ArviLaanemets ArviLaanemets is offline Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Windows 8 Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Don't understand your table logic! You table will be have some logic when:
1. You need a formula in column 'WITHIN 90' returning "Y" when something described in table row is paid within 90 days from 'BEGDATE', "N" when it was paid later than 90 days from 'BEGDATE' or is not paid and currently more than 90 days is passed from 'BEGDATE', and returning an empty string when it is not paid and currently less than 90 days is passed from 'BEGDATE'. When this is the case, you need an additional field in your table (e.g. 'PayDate'), where date the payment was finished will be stored;
2. You enter into column 'WITHIN 90' manually "Y" or "N" when the payment is made. When this is the case, you need the information, is the entry within 90 days or not, to use right character. One possibility is to have an additional column with formula which displays "N" whenever the entry is out of 90 day limit and payment is not made yet (there is no entry in column 'WITHIN 90'). Or you use conditional formatting in your table to color entries out of 90 day limit and payment not made in one color, entries paid later than 90 days in another color, and entries paid earlier in 3rd color (no need for additional column then).

The formula for additional column in 2. will be something like
Code:
=AND(TODAY()-$D2>90;$C2="")
Reply With Quote
  #3  
Old 10-16-2018, 06:34 AM
wheddingsjr wheddingsjr is offline Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Windows 7 64bit Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Office 2016
Advanced Beginner
Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type
 
Join Date: Mar 2017
Posts: 76
wheddingsjr is on a distinguished road
Default

Hi Arvi

Thanks for your response, however, based on what you wrote, we may not be on the same page. (I may have not explained it correctly).The "MEMNO" and the "TYPE" columns are what should drive the formula. The idea is to determine for each "MEMNO" how long an "E&M" line appears AFTER a "INTRAOCULAR" line. If the "E&M" line appears BEFORE the "INTRAOCULAR" line per "MEMNO",, it is an automatic "N" because it happened before the "INTRAOCULAR". I need to determine if the "E&M" lines that appear AFTER "INRAOCULAR" lines are within 90 days of the "INTRAOCULAR" line for each MEMNO. I hope that clears it up. Or did I make it even more confusing?

Thanks
Reply With Quote
  #4  
Old 10-16-2018, 07:33 AM
ArviLaanemets ArviLaanemets is offline Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Windows 8 Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

In case there never be 2 INTRAOCULAR entries for certain MEMNO with E&M entry between them, and in cases with several INTRAOCCULAR entries E&M entries before them must match only with 1st INTRAOCULAR entry, and E&M entries after them must match only with last INTRAOCULAR entry, it is possible to write a formula, but it is not trivial task.

Much easier (and allowing any order of entries) design will be the one, where every entry has separate column for INTRAOCULAR and R&M BEGDATE's.
I.e. columns like
MEMNO; IntraOcularDate; E&MDate; Within90
Reply With Quote
  #5  
Old 10-16-2018, 07:58 AM
wheddingsjr wheddingsjr is offline Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Windows 7 64bit Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Office 2016
Advanced Beginner
Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type
 
Join Date: Mar 2017
Posts: 76
wheddingsjr is on a distinguished road
Default

Thanks again Arvi

I figured it would be rather daunting. Since theres only 2,500 lines I was going to just got through them manually but thought I would at least see if there was a way I could do it via formula. I will try the seperate column suggestion to see if that works..once again thanks for the advise and help.
Reply With Quote
  #6  
Old 10-16-2018, 12:01 PM
NoSparks NoSparks is offline Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Windows 7 64bit Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

A macro approach option without adding any columns.
Attached Files
File Type: xlsm wheddeingsjr_Book1.xlsm (19.6 KB, 10 views)
Reply With Quote
  #7  
Old 10-16-2018, 12:05 PM
wheddingsjr wheddingsjr is offline Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Windows 7 64bit Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Office 2016
Advanced Beginner
Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type
 
Join Date: Mar 2017
Posts: 76
wheddingsjr is on a distinguished road
Default

Hi NoSparks

Did you add a macro? It doesnt appear to be. That is the result I am looking for but it looks like what I posted.
Reply With Quote
  #8  
Old 10-16-2018, 12:13 PM
NoSparks NoSparks is offline Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Windows 7 64bit Creating a formula that will determine if a code type occurs within 90 days of anotherspecific type Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Alt + F8 keys together for macro dialogue
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I type this exactly? Akki Word 4 01-26-2016 12:22 AM
What type of box do I have? teholder Word 4 12-11-2015 09:50 PM
Type in box during presentation JoelW2013 PowerPoint 1 12-10-2013 06:43 AM
Type once - enter twice garymeagher Word 1 12-10-2010 06:07 AM
Word won't let me type t, c, h, v laxation Word 0 04-22-2010 12:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft