counter

  1. W

    Format every second selected row VBA

    I have the below code to apply formatting to every second selected row. It works when i use Selection.Rows(Counter).Interior.Pattern = xlGray16 but i want to apply different formatting. i want every second row coloured in blue. I have tried the below but it doesnt work. any ideas? Sub...
  2. R

    VBA Code doesnt work when pressing the button but working when inside code module.

    Hi forum members. Macro is running fine from inside module. It stops on certain line . Point of this code: Im trying to change workbook generated by another application by prepending a number to certain lines after inserting a new column. Problem line : cell.Offset(2, -1).Select Sub...
  3. B

    VBA - Issue with importing sheets from each Workbook in folder, Excel crashing

    Hi, I'm having some weird issue with this code. Application.DisplayAlerts = False Set mb = Workbooks("Main Import Book.xlsm") ImportPath = TextBox1.Value Importsheet = TextBox2.Value Counter = 1 Set FSO = CreateObject("Scripting.FileSystemObject") Set fld = FSO.GetFolder(ImportPath)...
  4. LxGwy

    Limit Message based on Count for a particular UserName

    Intent: Display the Message Only once AND only for John Doe When counter and username are used separately, works fine, but not for both ========================================================== Option Explicit Sub Macro5() Dim MsgCounterJul05 As Long 'a zero will be placed in e5 (aka...
  5. M

    suppress dialog boxes vba NOT applicatoin.displayalert = false

    Here's my code: aggregate = "'" & ThisWorkbook.Path & "\" & counter & "\[aggregator.xlsm]" & ws.Name & "'!percent" prior = "[" & counter & ".xlsm]" & ws.Name & "!" & counter & "MBO" If counter = qt Then rng.Formula = "=iferror(" & aggregate & ",""oddly...
  6. T

    Sumif

    On Sheet1, I have the following 10 rows of data with its heading: Age Metric 26-30 1 26-30 1 26-30 1 26-30 1 26-30 1 26-30 1 26-30 1 26-30 1 26-30 1 26-30 1 I don't understand why after the first iteration in the loop, ModelArray below returns a value of 9 instead of 10...
  7. M

    Counting Word Frequncy- need fuzzy match

    I’m struggling to modify this code (below) to handle fuzzy matches, e.g., treating words like dog, dogs, Dog, and Dogs the same. Any suggestion as to how I can modify this code to do this? ———— Function Count_Positives(Sentence As String, Positive_Words As Range) Dim Counter As Integer For x =...
  8. Y

    FIFO worksheet decimal failure

    I have the following worksheet which works pretty well with the VBA code, except that when I put decimals in column A it throws off the FIFO inventory for some reason. Unfortunately we need to use decimals in column a. I have tried creating helper columns that convert the tons to pounds, but it...
  9. C

    Excel Macro recording elapsed time - Help please!!

    Hi All, I am fairly new to excel VBA, I need a macro that helps log downtime on a system. I propose to do this via a button that starts and stops a timer, in reality the first click - takes a time stamp, and so doesnt the second. Then you minus the two, giving you the allotted time. However...
  10. Y

    FIFO Inventory Tracker

    I would appreciate any assistance I could get with this inventory formula. Thanks! <tbody> Purchased tons cost per ton tons used FIFO ending value 25858.23 .3518 15858 3518.081 </tbody> I was using the following vba code to create a FIFO formula, but it does not work with...
  11. B

    Help Please - Refering to TextBoxs with incremental names

    Hi there, I have a UserForm with 50 Text Boxes that are named TextBox1, TextBox2 etc etc through TextBox50. Is there a way I can refer to the boxes using a counter? So I have a Integer Variable that increases by 1 based on some other code. Can I have something like TextBox(Counter).Value or...
  12. R

    Using "For" for multiple macros, How to do it?

    Hi all, I have 3 macros called : RegGenerate AreaGenerate ZoneGenerate then i want to make 1 module to run all this 3 macros, using "For", you might ask why? this is because i want to use progress bar to inform user, what macros that currently going my current on going code is like this, i...
  13. T

    Add multiple series to chart with loop function

    Hi, I have been struggling to add a loop function to add 107 series to a chart without manually adding in each one The X and Y data are in Columns B2:B8882 and C2:8882 and each series I want to plot is 107 data points. Total 83 series. Below is the code I have so far. it seems to work..ish...
  14. T

    Collection slow

    I have some data (spanning a few hundred thousand rows) in column A, such as: Day Monday Tuesday Friday ClsData: Option Explicit Private pDayOfWeek As String Private pFruit As String Public Property Get DayOfWeek() As String DayOfWeek = pDayOfWeek End Property...
  15. T

    Optimising loop

    I have some data consisting of two columns, for example: Name Amount a 100 a 200 a 300 b 20 b 50 b 60 I want to calculate the Lower Quartile for every "block". By block I mean where the name is the same (ie in the sample...
  16. T

    Using collection instead of array

    I have 10 rows of data in column A. I can calculate the upper quartile as follows: Dim MyArray() As Variant MyArray() = Cells(1, 1).CurrentRegion.Value Dim UQ As Double UQ = Application.WorksheetFunction.Quartile_Exc(MyArray(), 3) If instead of using an array, I choose to use a...
  17. A

    Label counter

    Good Day, Is it possible to set label like counter. If A1 value is 200 the label will start from 0 to 200 one by one and will loop always. Many thanks
  18. A

    Excel freezes when I run this macro (portuguese)

    Hi, I used to work with this macro however it stoped work. It is linked to a application (NewHotel) in order to retrieve sales revenue of 9 hotels. Can anyone help me with this error? '------------------------------------------------------------------------------------------...
  19. E

    VBA Match & index with conditions

    Hi all, i am currently trying to create a counter which can help me select an action (A,B,C) depending on the highest value in that state. Example: First, the random counter would random between "HIGHEST" or "RANDOM". The probability of the random counter would be 90% "highest" and 10%...
  20. B

    Need Message Box For Sorting Code

    Thanks as always for the Help. I have been using the code below for several years and have run into a small problem. I have never had enough data in the sheet to go over the 250 columns until recently. I would like to have a message come up if I reach the 250th column telling me I have reached...

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