Search:

Type: Posts; User: mirabeau; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    367

    Re: Increase looping speed

    taking "as tall as it would normally be" as the height of the first row on your worksheet, then add the three red lines to the code
    Sub blank_if_change()

    Dim r As Long, c As Long, a, u(), i As...
  2. Replies
    6
    Views
    367

    Re: Increase looping speed

    I believe there's no non-looping approach that does it faster.

    But you can use a much faster loop, albeit somewhat more complex code.
    Sub blank_if_change()

    Dim r As Long, c As Long, a, u(), i...
  3. Re: Is this even possible? VBA question about adding rows for blank data...

    There's what seems to be a similar problem in this recent thread

    http://www.mrexcel.com/forum/excel-questions/766334-data-missing-seris-dates-anybody-can-help.html

    Post #10 there has a code...
  4. Re: Request for help to split data from master to seperate sheets

    Make the modifications in red, as below
    Sub code_as_modified2()

    Const cl& = 3
    Dim lr&, lc&, s&, i&, w&
    Dim hdr, q As String, d As Object, sh As Worksheet
    Application.ScreenUpdating = False...
  5. Replies
    1
    Views
    128

    Re: vba duplicate!

    like this?
    although the output you give for sheet 2 doesn't entirely agree wirh your sheet 1 data
    Sub same_in_3cols()

    Const n& = 50
    Dim a, b() As Byte, u&()
    Dim i&, j&, k&, s&

    For s = 1 To...
  6. Thread: Using Instr

    by mirabeau
    Replies
    5
    Views
    207

    Re: Using Instr

    =Day(Int(BegDate))
  7. Re: Request for help to split data from master to seperate sheets

    here's a code I wrote a while ago and had stored in the attic. I think it's been posted somewhere on this forum some time ago.

    Maybe it'll do something like you are after.

    Change the Const cl&...
  8. Replies
    2
    Views
    290

    Re: Selecting certain random rows?

    try
    Sub test()

    Dim b() As Boolean, ash
    Dim rws As Long, c As Long, x As Long
    Set ash = ActiveSheet

    Sheets.Add.Name = "new"
    ash.Activate
  9. Re: Split Rows into Multiple Sheets Using Date

    try this modified version
    it makes no allowance for sheet headers since I don't know the specific structure of your data
    but you can easily remove any headers from your initial sheet and re-insert...
  10. Replies
    8
    Views
    206

    Re: How to insert a blank row between dates

    The code in post#4 worked on your data as you posted it in post#1.

    however, try this
    Sub insert_blank_row2()

    Dim r As Long, c As Long, a, u(), i As Long, k As Long

    r = Cells.Find("*", , , ,...
  11. Re: Split Rows into Multiple Sheets Using Date

    so, perhaps something like this
    Sub new_sheets()

    Dim c As Long, j As Long

    With ActiveSheet.Cells(1).CurrentRegion
    .Sort Cells(1)
    With .Resize(.Rows.Count + 1)
    c = 1
    For j =...
  12. Re: Split Rows into Multiple Sheets Using Date

    Some characters are not allowable as part of sheet names.

    / is one of these

    would you like your new sheets to be named in an allowable date format such as 23-03-2014?
  13. Replies
    8
    Views
    206

    Re: How to insert a blank row between dates

    You can try this.
    It takes dates as being listed down column A of the active worksheet, but can easily modify to another column if need be
    Sub insert_blank_row()

    Dim r As Long, c As Long, a,...
  14. Thread: Duplicate

    by mirabeau
    Replies
    1
    Views
    143

    Re: Duplicate

    Sub remdups()

    Dim d As Object, c As Variant
    Set d = CreateObject("scripting.dictionary")
    d.comparemode = 0
    With Range(Range("b1"), Range("b" & Rows.Count).End(3))
    For Each c In .Cells
    ...
  15. Thread: Rows to col

    by mirabeau
    Replies
    3
    Views
    177

    Re: Rows to col

    Sub dmdf()

    Dim a, b() As Boolean, c, e(), u&

    For Each a In Range("A:F").SpecialCells(xlConstants).Areas
    ReDim b(50), e(1 To 50, 1 To 1)
    d = 0: u = u + 1

    For Each c In a
    b(c) = True
  16. Re: data missing in a seris of dates.... anybody can help?

    A possible explanation is that your actual data are not in chronological order. The code requires that they be so in order to work properly.

    Here's a modified version that you may find works...
  17. Replies
    7
    Views
    342

    Re: Remove rows with VBA

    It's not the usual practice on this forum, and personally I hope it never becomes that way.

    It can be very frustrating to google for a solution to some potentially interesting problem and come...
  18. Re: Statistics - trying to figure out how much one variable affects another variable

    Regression.

    Can use Excel's Linest function or the data analysis regression add-in or various ad-hoc regression codes on this forum and elsewhere on the internet.

    If you want to make more out...
  19. Re: data missing in a seris of dates.... anybody can help?

    Amanda,

    The code worked for me on the data that you posted. I had nothing else to go on, so hard to speculate on the error.

    I don't think that code was likely to error. Are you sure it's not...
  20. Re: data missing in a seris of dates.... anybody can help?

    hi Amanda,

    does this one work for you?
    Sub insertdates()

    Dim c, rs As Long, i As Long, j As Long
    Dim y As Long, u As Long

    rs = Cells(Rows.Count, 1).End(xlUp).Row
    c = Cells(1).Resize(rs)
  21. Replies
    19
    Views
    768

    Re: Remove duplicates from an array

    Hi LuKate,

    Would you like to generate some test data with the code in Post#12 (preferably with the 100 on second line replaced by 1000) , and show how/if using Trim can thereby enable the Excel...
  22. Replies
    19
    Views
    768

    Re: Remove duplicates from an array

    The ribbon RemoveDuplicates and the VBA RemoveDuplicates should give the same result.

    I guess I was suggesting that you test the VBA version on some problematical data to see if it does in fact...
  23. Replies
    19
    Views
    768

    Re: Remove duplicates from an array

    OK. Good that you're happy with that.

    With my 2007 Excel, sometimes the RemoveDuplicates works with that test data, but frequently it doesn't.

    Perhaps it was upgraded between my 2007 and your...
  24. Replies
    19
    Views
    768

    Re: Remove duplicates from an array

    Howard,

    Just for your interest, and to possibly help you avoid wrong results, you might try running your remove duplicates code on some randomized test data, say as given by the following code...
  25. Replies
    12
    Views
    2,219

    Re: Squence Random Number Generator

    Thanks for the feedback Mark.

    Your comments are always appreciated. :)
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4