Re: Show all active documents in taskbar
Hi Laura,
You can display all open workbooks in the taskbar by clicking Tools > Options > View (tab). Then click the checkbox for Windows in Taskbar, and click OK
HTH
m
Re: Show all active documents in taskbar
Hi Laura,
You can display all open workbooks in the taskbar by clicking Tools > Options > View (tab). Then click the checkbox for Windows in Taskbar, and click OK
HTH
m
Re: On Error Goto Statement not working consistently [Resolved]
Thanks for the explanation, Richie(UK)
It all makes sense now.
m
Re: On Error Goto Statement not working consistently
Thank you XL-Dennis and hal. I was trying to shortcut the system. But I guess a validation loop is the more structured of the two approaches.
Regards,
m
Hi,
I've got the following code that's not working like I want it to.
Sub TestProcedure()
Dim MyNumber As Integer
On Error GoTo 1 'Redisplay InputBox
1:
MyNumber = 0 'Initialize variable
MyNumber = InputBox("Enter an Integer between 1 and 20")
MsgBox MyNumber
End Sub
What I'd like is to redisplay the InputBox in case the user inputs a non-numeric value. This works fine on the first instance of non-numeric input - the input box is redisplayed. However, the second time a faulty value is entered, a run-time error appears:
"Run-time error '13': Type mismatch"
Any help would be much appreciated.
m
Re: Data Validation - Drop Box Values - Only If Active Customer
Here's a round about solution:
1. Create a macro to dump Active Clients (using Advanced Filter) to another sheet. (This list can be used [dynamically] as the reference list for Data Validation.)
2. Use the workbook Open event as well as Sheet1 Activation as triggers for firing macro in #1 above.
Sample workbook attached for your reference.
HTH
m
Re: VBA Sum Formula be modified?
Haven't looked at your code in the last post, but here's a fix that seems to work for the problem you describle two posts ago.
Sub AA_DownTime()
Dim r As Range, txt As String
For Each r In Range("d2", Range("d65536").End(xlUp))
If r.Offset(, -3) = "Without Pattern Change" Then
txt = Left(txt, Len(txt) - 1)
r.Formula = "=sum(" & txt & ")": txt = ""
ElseIf IsEmpty(r) Then
txt = ""
ElseIf r.Offset(, 1) <> "S" And Not r.Offset(, -3) Like "*Pattern*" Then
txt = txt & r.Address(0, 0) & ","
End If
Next
End Sub
Display More
HTH
m
Re: VBA Sum Formula be modified?
Try this code:
Sub AA_DownTime()
Dim r As Range, txt As String
For Each r In Range("d2", Range("d65536").End(xlUp))
If r.Offset(, -3) = "Without Pattern Change" Then
txt = Left(txt, Len(txt) - 1)
r.Formula = "=sum(" & txt & ")": txt = ""
ElseIf r.Offset(, 1) <> "S" And Not r.Offset(, -3) Like "*Pattern*" Then
txt = txt & r.Address(0, 0) & ","
ElseIf r.Offset(, 1) <> "S" Then
txt = ""
End If
Next
End Sub
Display More
HTH
m
Re: VBA Sum Formula be modified?
How about modifying your If as follows?
If r.Offset(, -3) = "Without Pattern Change" Then
txt = Left(txt, Len(txt) - 1)
r.Formula = "=sum(" & txt & ")": txt = ""
ElseIf r.Offset(, 1) <> "S" And Not r.Offset(, -3) Like "*Pattern*" Then
txt = txt & r.Address(0, 0) & ","
[b]
Else
txt = ""[/b]
End If
HTH
m
PS: Clever Code
Re: SFAS 123 Calculations
Hi Bob,
Welcome to Ozgrid.
The "@" sign in 1-2-3 is (was?) used to indicate that a function is being called. In your case it's the natural logarithm (ln). I would suggest that you simply drop the "@" sign from your formula(s) and use it in Excel.
So this in 1-2-3:
((@ln(B1/B2)+(b4-B5)*B3)(b6*b3^.5))+.5*b6*b3^.5
Should look like this in Excel:
((ln(B1/B2)+(b4-B5)*B3)(b6*b3^.5))+.5*b6*b3^.5
HTH
m
Re: Display Add-in Macro names in the "Run Macro" dialog
Thanks Andy!
Your method's better than what I'm doing now (getting into VBE and running code from there) - though it'll be difficult memorizing the names of the 10+ macros that I have in the add-in. I'll go ahead with the User Form idea. Will bug you if I'm stuck.
Thanks once again to you and Jack in the UK for your time and guidance.
Regards,
m
Re: Assuming it is a formula when it is not
You have Transition Formula Entry feature turned on.
Click Tools > Options > Transition (tab)
Then uncheck the Transition Formula Entry checkbox and click OK.
HTH
m
Re: Display Add-in Macro names in the "Run Macro" dialog
I tried your add-in. Your macro name is not displayed when I press Alt F8.
Is the combo box idea (see my last post) a workable one?
m
Re: Display Add-in Macro names in the "Run Macro" dialog
Hi Jack,
The way I've been running my add-in macros (esp. those that are not assigned to custom buttons) is by getting into the VBE, placing my cursor within the desired code and clicking the run button. However, I just wanted to know if there was a way I could do it without getting into VBE. I guess there isn't.
As an alternative, is it possible to create a user form with a combo box that lists all general module macros, so that I could use that as a way to run my add-in macros?
Thanks.
m
Edit: Sorry, I posted without checking your reply. I'll give your add-in a try. Thanks.
Re: % Variance
Hi jshayler,
I see nothing wrong with either your formula, or the results that you're getting.
If your base is 78, then a score of 82 represents 5.1% (roughly), which technically lies outside the 5% variance range.
HTH.
m
Re: Display Add-in Macro names in the "Run Macro" dialog
I've posted a test file with a single macro. However, once it's been added in, the macro doesn't show up in the "Run Macro" dialog.
m
Re: Display Add-in Macro names in the "Run Macro" dialog
I'm not having any problems with the functions.
It's the Subs that I need help with. They're all General Module procedures.
The Run Macro dialog shows a list of GM macros in all open workbooks - Except the Add-in.
Thanks.
m
Hi,
I have an add-in (xla) file that contains some general-purpose macros and functions. I generally assign my macros to custom toolbar buttons.
I've written some new macros in the add-in, and would like to be able to run them without using custom buttons. However, the Run Macro (Alt F8) dialog doesn't display the names of my macros. Is there a way for getting all of the macros in my add-in file to show up in the above mentioned dialog?
Thanks.
m
Re: insert calculation in pivot
Try this:
Right-click any part of the Pivot Table Report that you already have, select Formulas and click Calculated Field.
You'll find the rest of the steps self-evident.
HTH
m
Re: Locate missing numbers in a large set
Hi Marcus,
I think COUNTIF would be a better way to go, as you can do block searches instead of single-column (as in the case of VLOOKUP). Obviously, with only 65536 rows available, your used up numbers must reside in a range spanning at least several columns.
Will need a snapshot of your data to give you more specific suggestion.
HTH
m
Re: Multi Criteria Filter
Hi Stu,
Have a look at the attached workbook. I used the macro recorder in conjunction with the Advanced Filter command. Use the Apply Filter and Remove Filter buttons on Sheet2 to suit your needs.
HTH.
m