Calculated GOTO

Alan Nicoll

Board Regular
Joined
Feb 3, 2004
Messages
71
Is a calculated goto or some kind of Indirect function possible in VBA?

Seeking guidance. :pray:

Thank you.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
What conditions to what statement labels? Should be able to do it, directly or indirectly.
 
Upvote 0
I don't recall at this point why I wanted this capability, just remember I couldn't find a way to do it. Since being clued in to the existence of this board I'm remembering all the things about VBA that I tried to do over the last 4 months and couldn't get out of Help or the books I got from the library (can't afford to actually BUY a book).
 
Upvote 0
Hi Alan:

I had a little play with what you asked. Unless i am missing something, I can consider Calculated Goto as Goto with a Condition, as in ...
Code:
Sub yCalculatedGoto()
    If [A1] = 3 Then GoTo Continue
    Exit Sub
Continue:
    If [B5] = 2 Then MsgBox "I am responding to a Condition"
    If [B5] < 2 Then MsgBox "I am still responding to a condition"
End Sub
Since I don't know the context in which you are asking this, I don't know whether this approach will work for you or not -- but I thought I will share this with you anyway!
 
Upvote 0

Forum statistics

Threads
1,224,270
Messages
6,177,574
Members
452,784
Latest member
talippo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top