0

I have a script

=MATCH(H2,INDIRECT("'SALES'!A"&R2&":CC"&R2),0) 

to produce the column number of the minimum value on the SALES sheet. The issue is that when I change the minimum value it produces a completely wrong number and reads the wrong column. How would I get this to read only specific columns and find the minimum: L, W, AH, AS

pnuts
  • 58,317
  • 11
  • 87
  • 139
user3037024
  • 23
  • 1
  • 1
  • 4

1 Answers1

0

Guessing that: L, W, AH and AS are column references in SALES containing values from which you wish to locate the minimum, and that these values are all in Row2 then:

=MATCH(MIN(L2:W2:AH2:AS2),2:2)  

should give you the column number. Add 64 and wrap in CHAR() for the column letter reference.

pnuts
  • 58,317
  • 11
  • 87
  • 139