When used in a spreadsheet, I want the result from this VBA function to return the array value "WMKR(MinIndex)" to the same cell that it's called from, without overwriting the function call in the spreadsheet cell. For now I am using ActiveCell.Offset(0,1).Value to put the VBA function result in the adjacent column, but this is not a desireable solution. This workaround currently results in the correct answer in the adjacent cell, and also returns a "#VALUE!" error in the cell where I called "=WName()" (I guess since nothing is returned from the funtion call to that cell).
If this were a built-in Excel function, the answer to the =function() call would show in the cell, but the formula would remain in the formula box.
Can you show me how to get my =WName() VBA function to behave the same way? Thanks!
Bookmarks