Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 0.67 seconds.

  1. Replies
    6
    Views
    206

    Re: Creating Multiple Calendar

    This should be better !!!


    Sub MG05Oct05
    Dim mDay As Long, col As Long, Rw As Long, mMax As Long, Mth As Long
    Dim Rng As Range, Dn As Range, n As Long, Dic As Object, c As Long
    Dim Sp As...
  2. Replies
    6
    Views
    206

    Re: Creating Multiple Calendar

    This is a bit of a work round but might do !!!


    Sub MG05Oct14
    ' Month Calendars only
    Dim mDay As Long, col As Long, Rw As Long, mMax As Long, Mth As Long
    Dim Rng As Range, Dn As Range, n As...
  3. Replies
    6
    Views
    206

    Re: Creating Multiple Calendar

    Try:-


    Sub MG03Oct25
    ' Month Calendars only
    Dim mDay As Long, col As Long, Rw As Long, mMax As Long, Mth As Long
    Dim Rng As Range, Dn As Range, n As Long, Dic As Object
    Dim Sp As Variant, Dt...
  4. Re: VBA to get a number for a HTML style value without the "%" suffix

    Try this for results starting "B2".


    Sub MG06Sep24
    Dim txt As String, Sp As Variant, n As Long, c As Long, a, b
    txt = Replace(Range("A1"), ";", ":")
    Sp = Split(txt, ":")
    a = 1: b = 1
    For n =...
  5. Re: Splitting a Text String into Identifiable Words and Comparing them to other Cells

    Try this as a possibility :-
    NB:- I see from your data that Your "column 2" is actually column 3.
    Results in column 4.


    Sub MG05Sep18
    Dim RngA As Range, DnA As Range, DnC As Range, RngC As...
  6. Re: Comparing 1 value with two other columns Loop

    They don't duplicate because Either column "D" or "E" is empty.


    What is the actual requirement for empty cells
  7. Re: Comparing 1 value with two other columns Loop

    Below is a Test file with your Data.
    Run the code a couple of times , see if its working , then try with your data !!!
    https://app.box.com/s/gy8yacldolx591wzaowx1sen3l03kl9k
  8. Re: Comparing 1 value with two other columns Loop

    When my code is run on that data the 2nd ,3rd and 5th lines are duplicated , where is that incorrect ???
  9. Re: Comparing 1 value with two other columns Loop

    Can you show an example of your initial data in "A,D,& E"
  10. Re: Comparing 1 value with two other columns Loop

    Try :-


    Sub MG04Sep02
    Dim n As Long
    n = 1
    While Cells(n, "A") <> ""
    If Not IsEmpty(Cells(n, "D")) And Not IsEmpty(Cells(n, "E")) Then
    If Not Cells(n, "A") = Cells(n, "D") Or Not...
  11. Replies
    6
    Views
    476

    Re: Macro Buttons change colour when pressed

    You're welcome
  12. Replies
    3
    Views
    411

    Re: order 2 non-adjacent columns

    Try this for results in column "H" :-


    Sub MG01Sep13
    Dim Rng As Range, Dn As Range, R As Range, Ray As Variant
    Set Rng = Range("A2", Range("A" & Rows.Count).End(xlUp))
    Set R = Union(Rng,...
  13. Replies
    6
    Views
    476

    Re: Macro Buttons change colour when pressed

    Try something based on below:-
    NB:- The code show 2 sets of 3 shapes !!
    NB:- I found it is better to do a "Assign Macro" for each shape before you right Click and "Group" them.
    Sometimes with...
  14. Replies
    6
    Views
    476

    Re: Macro Buttons change colour when pressed

    Try code based on below:-
    Add code for with extra Shapes as required
    NB:-To add code Right click shape and select "Assign Macro"



    Sub colshp()
    Dim shp As Shape
    For Each shp In...
  15. Re: Macro help: Transpose row to column & Copy, paste data

    Good news !!!
  16. Re: Randomly generated list with duplicates in column

    Thinking about your problem a bit further
    It appears to me that each time the code is run for a new names in column "D", you need the code to pass the Current "locations" (ref:- previous Random...
  17. Replies
    5
    Views
    367

    Re: User Form Option Button

    You're welcome
  18. Replies
    5
    Views
    367

    Re: User Form Option Button

    A similar but slightly better Option :-


    Option Explicit
    Dim NwOp As Object
    Sub Lpst(Op As Object)
    If NwOp Is Nothing Then
    Me.TextBox1.Text = "No Previous"
    Set NwOp = Op
    Else
  19. Re: Randomly generated list with duplicates in column

    Try this example file :-
    https://app.box.com/s/9mza8el4q3oqyhxu9un9fbjar8jncoqp
  20. Replies
    5
    Views
    367

    Re: User Form Option Button

    This is one way:-
    If you add a textbox1 to your Userform it will show the previous Optionbutton as you select a new Optionbutton.
    Paste code in Userform module and add code for further option...
  21. Replies
    5
    Views
    214

    Re: Call Sub from UserForm

    It appears your trying to load the userform listbox from a button on the sheet. Why have you not got the buttons on the userform
    or load the listboxes From a dropdown on the userform.

    In a basic...
  22. Re: Randomly generated list with duplicates in column

    Another option for results in column "D".


    Sub MG23Aug15
    Dim RngA As Range, Dn As Range, c As Long, n As Long, Nam As Long, RngB As Range
    Set RngA = Range("A2", Range("A" &...
  23. Replies
    5
    Views
    214

    Re: Call Sub from UserForm

    With 4 Commandbuttons in the Userform/module this worked for me.
    If you are still stuck please send your code !!!


    Private Sub CommandButton1_Click()
    ListBox1.RowSource =...
  24. Re: Macro help: Transpose row to column & Copy, paste data

    You're welcome
  25. Re: Macro help: Transpose row to column & Copy, paste data

    Based on your actual data starting "A4", Try this:-


    Sub MG22Aug12
    Dim Lst As Long, Lstcol As Long, n As Long, Rng As Range, Dn As Range
    Application.ScreenUpdating = False
    Lst = Range("C" &...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4