counter

  1. S

    Formula Based Text based on certain criteria/range

    Hello, I am trying to get automated text (highlighted in color red) based on the selected range and need solution in cells which says Total (Apr-Dec) and Total (Feb-Nov). This label should be based on corresponding month where 1st value in counter row is 1 and corresponding month where last...
  2. S

    VBA to save to OneDrive

    Hi, I have a Macro spreadsheet which I am trying to share with other users via OneDrive. Sharing the Spreadsheet is no problem but the other users cannot use my macro to export to OneDrive because they do not have access to the "my" username file path; [CODE]Sheets("Export").Select...
  3. M

    Macro stops after 38 hours, is this a feature?

    Hi, We have an SQL query that uses a stored procedure on our database. For some reason it keeps going into error every few days. I made the below to refresh the query and try to detect the time for the break, however, coming in this morning to check it, it has errored (msgbox displayed) after...
  4. SharmaAntriksh

    Extract data from an array and populate new array but only keep certain columns

    <tbody> Name Serial Number Date Price Address Comments A 1 1/1/2019 123 abc xyz B 2 1/1/2019 123 abc xyz A 3 1/1/2019 123 abc xyz C 4 1/1/2019 123 abc xyz </tbody> i have data that looks like this, i am trying to load this into an array and populate a new array with the data...
  5. S

    VBA loop counter and offest

    Good morning all, I have a bit of a tricky situation and trying to come up with something creative. Essentially, what I want it to to is something like... Set Variable to A1 Run Loop Loop Counter = 1 Reset variable to A1, offset down 1 Run Loop Loop Counter = 2 Reset variable to A1, offset...
  6. S

    Runtime Error Overflow

    Greetings, I am receiving an Overflow error on the following line: centroids(ii, bb) = centroids(ii, bb) / counter The line is within the script below: Public Function ComputeCentroids(X As Variant, idx As Variant, K As Variant) As Variant...
  7. CatLadee

    Trouble with Counter to Increment Through an Array - What gives?

    Can one of you smart people please give me a hint about why I am unable to increment through one range to move it to another location with my current code? The current counter just gives the last variable in the loop for all of the new range's slots. The comma'd out counter says type mismatch...
  8. J

    Creating a counter that will not reset at any point

    Hi all, I have some code that will create a counter and add 1 each time the criteria is fulfilled. This is inside a loop and I have found that the counters will reset outside of this loop. Is there a way to make the counters the same value throughout the code? All help is much appreciated.
  9. R

    This code is used to rearrange some columns, but it’s not working properly?

    This code is used to rearrange some columns, but it’s notworking properly? Why is the following code working for the first worksheetbut not working for the second work sheet? It scrambles up the first header row. For i = 1 To ThisWorkbook.Sheets.Count Sheets(i).Activate With ActiveSheet...
  10. S

    Selecting Cells from Array

    I have an array that stores range addresses. Is there a way I can select all cells that are in the array? Something like this. Sub FillDownList()On Error Resume Next Dim rng1, rng2, rng3 As String, x As Integer, MyArray As Variant, SelectionArray(1 To 90) As Variant Application.ScreenUpdating =...
  11. V

    Counter

    my below code gives me output as ES1 and the counter is not working as output ES1, ES2, ES3 and so on. I am not sure what is wrong. Code:- Private Sub CommandButton1_Click() Dim i As String, e As String i = 1 e = "ES" Set Rng = Sheets("sheet1").Cells(Rows.Count, 3).End(xlUp).Offset(1, 0) For...
  12. H

    Lotto number results counter

    Good afternoon Masters, I have some codes that comes from other users regarding lotto numbers generators. I want to update it by getting the combination of the previous lotto results which I have entered above the file, then a message box will show how many time we run the vba codes before we...
  13. T

    Convert Dictionary Early to Late Binding

    The code below work in early binding: Dim DIC As Scripting.Dictionary 'Dim DIC As Object Set DIC = New Scripting.Dictionary 'Set DIC = CreateObject("Scripting.Dictionary") Dim MyArray() As Variant MyArray() = Sheet1.Cells(1, 1).CurrentRegion.Value...
  14. E

    Forecast function in excel 2016

    Hi, I am trying to use the =forecast.ets function to forecast a call volume assumption for a 30 minute interval. However the forecast function is including the zeroes in the process which lessen the forecast value, what is the best way to counter that but still using the forecast function...
  15. R

    Counter of amount of selections from list

    Hi guys, I'm looking for a macro that presents a list consisting of data from another worksheet in the same workbook. I would then like to be able to count and post the result of the counter in yet another cell of the sheet, every time the selection is chosen. Thanks so much for your help or...
  16. R

    Creating a scrollbar within an item that was created during runtime

    Hello Everyone, I have few questions here 1. Just like what is in the subject line, I would like to learn how can I add a scrollbar within a frame that I created as well. Please see the code I created so that I can explain it further. For counter = 0 To 10 Set MyFrame=...
  17. P

    Random Selection Repetition in Rows

    I found the following code that randomly selects from a list and creates a random list into a column. Sub Random_Names() Dim NameColumn As Integer Dim FirstNameRow As Integer Dim NewColumn As Integer Dim NumberOfNames As Integer Dim lrow As Long Dim StoredNames As String Dim Counter As Integer...
  18. SharmaAntriksh

    VBA Arrays

    Why do i get an error is the last line of this code? Sub ExtractingDatawithArrays() Dim TeamStatus() As Variant, ExtractData() As Variant, Counter As Long Dim i As Long, k As Long TeamStatus = Sheet1.Range("A1").CurrentRegion For i = 2 To UBound(TeamStatus, 1) If...
  19. R

    Userform Objects During Runtime

    Hello, I just started learning how to create objects during runtime and I am currently having a problem with creating multiple frames horizontally and I can't seem to line them up properly as each frames has their own width. Can someone help me out with creating multiple frames considering that...
  20. H

    Any way to make it better?

    Just a quick question, Since I've been learning arrays I've tried to interject them into places where I can. For example here, I am deleting certain columns based on their column number, pre-set in an array. Dim cols As Variant Dim counter As Double Dim Top As Double cols = Array(8, 5...

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