calculate max age

prlondhe

Board Regular
Joined
Jan 4, 2014
Messages
54
CLIENT CODESUB CODECOMPANYPOLICY TYPEPOLCY SUB TYPEVEHICLE NUMBERSERIAL NUMBERINSURED NAMEBIRTH DATESUM INSUREDAGEmax age
X1045NIAMEDICLAIMINDIVIDUAL1xyz21/10/1957200,00059
X1045NIAMEDICLAIMINDIVIDUAL2abc07/08/1959200,00057

<colgroup><col span="7"><col><col><col><col><col></colgroup><tbody>
</tbody>

Hi

I have the above file which contains age for each individual.
there can many records with client code.
Now I want to calculate the max age for each client code in column a with vba. Can somebody help
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

jeffreybrown

Well-known Member
Joined
Jul 28, 2004
Messages
5,149
Maybe you could tell us how you get the max age?

EDIT: Must have missed the client code part
 
Last edited:
Upvote 0

pjmorris

Well-known Member
Joined
Aug 2, 2012
Messages
2,102
Office Version
  1. 2016
Platform
  1. Windows
Try this in cell L1:

=MAX(IF($A$2:$A$4="X104",$K$2:$K$4)) and enter with CTRL-SHFT-ENTER to make it appear like this: {=MAX(IF($A$2:$A$4="X104",$K$2:$K$4))}

Then copy down.

You'll obviously need to adjust the ranges as necessary before copying.
 
Upvote 0

Forum statistics

Threads
1,190,677
Messages
5,982,216
Members
439,769
Latest member
trungminh2802

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
Top