Hi,
VBA is not needed. You could use standard Excel functions.
Here's one array formula - (enter with Ctrl-Shift-Enter) in AJ4 and copy down
Put the letter Q in row 1 above every Quarter column so that the formula can ignore those columns
Formula:
=MAX(IF(($C4:$AK4<>"n/a"),IF(C$1:AK$1<>"Q",$C4:$AK4,0),0))
Change MAX to MIN for the minimum value.
Personally I'd be inclined to capture your data in a normalised 2 dimensional table of column field headers and rows for every record that could be used by a pivot table, or by simpler formulae in any pre-formatted Sales Report.
i.e. Have a separate sheet in which you have columns for recording:
Date
TP Name *
Product Name *
Quantity
The * fields could be drop down validation cells that contain a list of the allowable choices like say "TV", "Furniture"..etc to make Data entry even simpler.
Bookmarks