Retrieving and Highlighting Between tables and a Cell

ozop102

New Member
Joined
Apr 18, 2019
Messages
4
I have a table im trying to do two things in. I am intending the user to enter parameters into the following cells

Q32 - selects rank
Q33 - user enters a date

From that I need the following to happen:

1. Enter into cell Q35, the year of the next applicable board
2. highlight the row in the appropriate table

There are three tables, one for each rank possibility and each table list the year of the next board based on a date range. The users date range entered in Q33 should fall between two dates in the corresponding table.

I have attempted to conditionally format using the OR function but cant get the intersection to work and correctly highlight the appropriate cell.

I havent been able to figure out how to retrieve the appropriate year into the cell either.

The tables are copy and pasted from an external source and are updated each year. We have no control over the formatting, we just have to work with what we get.
The following is how the the tables are organized and the date range comes to us as a single field. There are 1 or 3 columns associated with each possible rank.
If your DOR to Captain is:You are forecasted to meet the following boards:
MajorLt ColColonel
01 Jan 2014 - 31 Dec 20142018202220232024202820292030
01 Jan 2015 - 31 Dec 20152019202320242025202920302031
1 Jan 2016 - 31 Dec 20162020202420252026203020312032
1 Jan 2017 - 31 Dec 20172021202520262027203120322033
1 Jan 2018 - 31 Dec 20182022202620272028203220332034
1 Jan 2019 - 31 Dec 20192023202720282029203320342035

<tbody>
</tbody>
I have the file here below. If someone can help me out and steer me in the right direction id be very greatfull!

<tbody>
</tbody>
https://drive.google.com/open?id=1m5fPg73rfk9oWAOKsYWM5pGSsDxmzgD6
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hello,

The best solution is to properly redesign your 3 tables into a single clean database ...

with NO MERGED CELLS ...

Otherwise, your headaches will just be terrible ... :wink:
 
Upvote 0
Yea, I had a feeling it would over complicate things. Ive split the cells to show two dates and I added a cell that returns a 1 if the user date falls between a range. Still not quite sure what to use to format and return the value I need.
 
Upvote 0
Thank you. That is a good resource and it will help me later on for sure! The issue is that this table however is not a product I have control over. It is provided to us from another source. Since it is always in the same format I can make a macro that will split the field and create two columns for the date range.

For this tho, I added a hidden column that calculates a 1 or 0 if the provided user date falls within a row. I am now able to use vlookup to extract the date I need and display it. Ill post the document tonight so maybe someone with more knowledge can tell me if there is a better way...I feel I took the long way around using nested if statements.

Now my question still remains on how to highlight the entire row that corresponds to the user date. If I use vlookup, I only highlight the matching cell, how can I have it highlight the row of the table?

Again, the table design is copy and pasted from another source. I cant change how they provide me the table.
 
Upvote 0
Hello,

Fully understand your constraint of using external tables from a source you are not controlling ...

Your first macro should consider these tables as raw inputs ... and transform them into a useful database located in a dedicated new worksheet ...

At this stage ... you will find yourself on the ' start line ' ...

Hope this clarifies
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,809
Members
449,048
Latest member
greyangel23

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