Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 0.60 seconds.

  1. 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 =...
  2. 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...
  3. 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
  4. 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
  5. 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 ???
  6. Re: Comparing 1 value with two other columns Loop

    Can you show an example of your initial data in "A,D,& E"
  7. 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...
  8. Replies
    6
    Views
    428

    Re: Macro Buttons change colour when pressed

    You're welcome
  9. Replies
    3
    Views
    355

    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,...
  10. Replies
    6
    Views
    428

    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...
  11. Replies
    6
    Views
    428

    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...
  12. Re: Macro help: Transpose row to column & Copy, paste data

    Good news !!!
  13. 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...
  14. Replies
    5
    Views
    210

    Re: User Form Option Button

    You're welcome
  15. Replies
    5
    Views
    210

    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
  16. Re: Randomly generated list with duplicates in column

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

    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...
  18. Replies
    5
    Views
    147

    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...
  19. 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" &...
  20. Replies
    5
    Views
    147

    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 =...
  21. Re: Macro help: Transpose row to column & Copy, paste data

    You're welcome
  22. 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" &...
  23. Re: VBA - find duplicates and extract summary data to new sheet

    It look like the code has been altered slightly !!
    You have this:-


    With Sheets("Details multiple claims").Range("A1").Resize(, 4) = Array("W/E", "Employee", "Lines of claim", "Amount of...
  24. Replies
    2
    Views
    93

    Re: Permutations of sets of values

    Try this:-


    Sub MG20Aug13
    Sub Permutations()
    Dim rRng As Range, p
    Dim vElements, lRow As Long, vresult As Variant, n
    Dim Dn As Range, c As Long, Ray()

    Set rRng = Worksheets("Tab...
  25. Replies
    4
    Views
    138

    Re: Coloured Cell count #Name error

    You're welcome
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4