i have a 53 sheet workbook. On the summary page i am trying to find the large value in a row and return the column number.
the calling sub passes to a function and it needs to return the column number.
it work fine on the first pass, when the row is 2 but the second pass it passes 3 and i get the error.
Error 13 Tyoe Mismatch.
i have 9 rows and up to 52 columns, but only 23 has data in them as of now.
some of the 9 line have dollar values, precentages, and regual intergers.
This line in the function is were the error is.
Set rngMaxCell = rngVals.Find(.Max(rngVals), after:=(Worksheets("Summary").Cells(myRow, ColStart)), LookIn:=xlValues)
I changed this line several time. As I siad it works on the first pass only.
i need to use this code so i can use it in another sheet also.
Thanks in advance.
The attached sample is very cut down. the summary sheet is what I am working with.
What I want is to take the highest value in each row (2 thru 9) and put in column F Row (13 thru 20 (the green highlights) and put the week
from the column (row 1) it was found in in column G (the blue highlights).
Bookmarks