Should be all that's needed
The important thing is Application.Caller witch is the cell that the formula is in
Once we have that, we know the .Row and that allows us to go to the correct worksheet
Printable View
If that works out, I noticed that it looks like you could have 100 buttons in A and B on "1", with the only difference being the virtually identical 1 of 100 macros
Maybe using a worksheet event hander to process a double click in A4, B4, A5, B5, .... would be easier
I accidently deleted the "Home" button macroCode:Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim r As Long, c As Long
With Target.Cells(1, 1)
r = .Row
c = .Column
End With
If r < 4 Or r > 50 Then Exit Sub
If Len(Me.Cells(r, 4).Value) = 0 Then Exit Sub
If c = 1 Then
Call Application.Goto(Worksheets(CStr(r)).Range("A49"), True)
ElseIf c = 2 Then
Call Application.Goto(Worksheets(CStr(r)).Range("A75"), True)
End If
End Sub
don't think I am copying the code correctly. I cannot get the formula to work in my working spreadsheet. I get ###### as a result.
I am going to Developer > Visual Basic > Module1_UDF > View Code then copy the code inside the box. not sure about about "Option Explicit" I don't see that. what am I missing?
actually, I am not seeing a Module1_UDF in my working spreadsheet. Only see it when your attachment is opened.
a lot of those macros are broken. I tried deleting, but couldn't. the delete button was grayed out.
I inserted a new Standard Module, named it Module1_UDF, and wrote the macro on that
Attachment 21625
Don't know what i am doing wrong. I copied in my working spreadsheet and am getting false regardless of argument. I did the same test in my sample spreadsheet and it worked. copied to both spreadsheet exactly the same
would you be willing to meet with me over skype and I will share my screen to show you what i am seeing? The file size of the working spreadsheet is too large for me to attach.
easier to just attach a workbook with "1", "4", and "5" again to the forum
Include the version of the macro you're having issues with
It works with ver 3 -- basically the same as ver 2 --
Do you have calculation set to automatic?
Here is the sample spreadsheet.
I copied to earnedmimimum code to module 1.
Attachment 21628
yes, calculations is set to auto.
When you put the function in, you didn't remove the formula, so it was probably testing something like (formula) = (function) as a Boolean, and since they didn't match the answer was False
Attachment 21631
Try ver 5
jeez... thanks. working now. I truly appreciate your help on this. Thank you very much!