VBA: Find latest date in row and return header and data

omnivl

Board Regular
Joined
Aug 25, 2014
Messages
53
I have a header and rows of data that looks like so:

StatusContract NumberCommentsAdvertisedClosedEvaluatedContract ValueAwarded
Executed1waiting on david20/11/1730/11/171/12/17$50,000
Open2Finalising contract10/11/1716/11/17
Open3not sure5/11/1810/11/1813/11/18$21,00015/11/18

<tbody>
</tbody>


Firstly i need to look at status, if the status is "Executed" then ignore and go to the next row. It then needs to find the latest date entered for that row, in row 2 this would be 16/11/17, it needs to then put into an array the contract number "2", then comments "Finalising contract" then the date 16/11/17 followed by the latest date header Closed

Once they are in an array i need to print them to sheet1 in the workbook for example


Contract Number: 2, Closed - 16/11/17, Finalising contract
Contract Number: 3, Awarded - 15/11/18, not sure

<tbody>
</tbody>

Any help would be really appreciated!

Thanks
Ben
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Which columns are the columns you want to check the date?
There is a whole range with dates and some non-date values in between.
I adde a column with this formula but since I don't know the whole range:

Code:
=IF($A2="Executed","",MAX(AQ2,AO2,AN2,AM2,AK2,AJ2,AI2,AH2,Q2,R2,S2,T2,U2,V2,W2))
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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