Sure. :)
Even if you want to filter for say the values 1, 2, 3 and 4 the array you pass to the autofilter criteria actually needs to contain "1", "2", "3" and "4". The simple way to do that is to...
Type: Posts; User: rory; Keyword(s):
Sure. :)
Even if you want to filter for say the values 1, 2, 3 and 4 the array you pass to the autofilter criteria actually needs to contain "1", "2", "3" and "4". The simple way to do that is to...
The @ is shorthand for 'this row'. The theory is that it is much clearer what the formula is doing using a structured reference than just using A1.
You need to declare the array as String even if the data is numeric.
Which version of Excel? Have you rebooted?
@RG
You need an application-level event. A workbook event in the personal workbook would only work if you printed the personal macro workbook. ;)
=VLOOKUP(G6,'january pnc'!E1:F209,2,0)
as suggested ;)
it appears to be the last value plus one-third of (the last value - 2 * the first value + the second value)
I have no idea why though!
Dean,
You're welcome! :)
I would suggest including the workbook name in the OnAction property:
Sub STATEMENTS_COPY()
Const MODULE_NAME As String = "STATEMENTS_MODULE" 'name of module to transfer
Const...
If you want to make it easy, a workbook would be much more helpful than a picture. ;)
For part 1, right-click the sheet tab, choose View Code then paste this in:
Private Sub...
You'd need VBA code - is that acceptable?
Global macros are stored in a Personal Macro Workbook or in add-ins. Other macros are saved in their respective workbooks. Did you install VBA when installing 2013?
=sumproduct((e5:e46<=7)*b5: D46)
That should translate to:
xlDestRange = xlWorkSheet.Range("C1:C" & n)
xlDestRange.Select()
...
Sorry, my fault. It's only with an equality criterion that SUMIF doesn't care about text/numbers - it does make a difference if you are comparing greater than or less than. Use:
...
Can you provide your existing .Net code (VB, C#, other?) as well as the recorded macro?
No - you'd need conditional compilation and to declare PtrSafe and use a LongPtr for the window handle
#If VBA7 Then
Declare PtrSafe Function SetForegroundWindow Lib "user32" Alias...
That won't matter to a SUMIF formula.
I'd go back to SUMIF for that
=SUMIF(Sheet1!F2:F4816,">=3000",Sheet1!H2:H4816)-SUMIF(Sheet1!F2:F4816,">3015",Sheet1!H2:H4816)
Perhaps
=sumproduct((range2>range1)*(range2-range1))
1. I cannot see how simply adding that code could affect the display of your form!
2. If you put the code in a form you need to use Private Declare Function
For the sort of bands you want:
=SUMPRODUCT((LEFT(Sheet1!F2:F4816,4)>="3100")*(LEFT(Sheet1!F2:F4816,4)<="3115")*(RIGHT( Sheet1!F2:F4816,1)="X"),Sheet1!H2:H4816)
Would that include say 5000X or do you still only want items that start with '31'?
Or better:
=SUMIF(Sheet1!F2:F4816,"31??X",Sheet1!H2:H4816)
=SUMPRODUCT((LEFT(Sheet1!F2:F4816,2)="31")*(RIGHT( Sheet1!F2:F4816,1)="X")*(LEN(Sheet1!F2:F4816)=5),Sheet1!H2:H4816)