I have the following formula that searches to find the latest row of data

Column C is the date

Column F is the job ref

Column G is the article ref

IF(AND(MAX(($C$12:$C$10023*($F$12:$F$10023=F322)*($G$12:$G$10023=G322)))=C322,C322<>""),"Latest","")

I have this on a long list and have to drag down the formula to 7000, plus rows

Is there a way to replicate this as code as to not slow up the sheet when typing?

Many thanks