Vba for most recent date matching criteria

Godders199

Active Member
Joined
Mar 2, 2017
Messages
313
Office Version
  1. 2013
Hello, I am trying to add the following line of code to an existing workbook to show the most recent date from column q, where column a match’s the criteria in cells (I,1)

cells(I,40) = evaluate (“max(if( “& (thisworkbook.sheets(“Adviser data”).Range(“a:a”)). & “=“ & cells(I,1). & “,” &(thisworkbook.sheets(“Adviser data”).range(“Q:Q”)) & “))”)

all I am able to return is #value. I keep reading on internet and making changes but nothing seems to work.

So any help appreciated.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
A few things:

1. What is your value of l in cells(l, 1)?

2. I think there also may be an issue with the structure of your formula, but we cannot really tell without knowing what you are intending to build.
Can you post an example of what this formula should look like, if posted directly to an Excel sheet?
Or at least give us a detailed explanation of what this formula is supposed to be doing?
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,393
Members
449,081
Latest member
JAMES KECULAH

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