Search:

Type: Posts; User: Michael M; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.53 seconds.

  1. Replies
    4
    Views
    22

    Re: Sum of columns

    I agree....would only do it if there was other cells impacted by that formula !!
  2. Replies
    4
    Views
    22

    Re: Sum of columns

    Try


    Sub MM1()
    With Range("d2")
    .Formula = "=Sum(f2:h2)"
    .Value = .Value
    End With
    End Sub
  3. Replies
    13
    Views
    271

    Re: Returning Home

    Ok, slightly different approach
    This in a standard module


    Option Explicit
    Public LastActivityTime As Date
    Sub Check_Inactivity2()
    Const Inactivity_Delay As Date = #12:01:00 AM# '...
  4. Re: how to limit the day to open excel file by VBA

    Try


    Sub workbook_open()
    If Date >= "30/08/2019" Then MsgBox "file has expired"
    ActiveWorkbook.Close
    End Sub


    remembering, of course that if a person disables macros, it won't take effect.
  5. Replies
    13
    Views
    271

    Re: Returning Home

    Did you put it ALL in the Module ??
    See Post #4
    The first block of code goes in the New module
    The 2nd block of code goes in the "This Workbook" module
  6. Replies
    13
    Views
    271

    Re: Returning Home

    In a new module.
    ALT + F11 to enter the VBE
    In the LH Project window select your workbook, then in the toolbar, select Insert>>Module>>>Paste coe in RH window.
  7. Re: dropdown list in alphabetical order data validation...

    What are you actually trying to do ?
    A bit more info about the problem may help, not what you think might be the solution ?
  8. Re: VBA Excel: Clear the entire col expect A1

    They work fine for me...
    are you running the entire code or just stepping through line by line ?
    Line by line will initially clear the entire column, but replaces A1 when it is finished.
  9. Re: HELP Excel Formula: concatenate if cells (col) is not blank

    Glad to help...:beerchug:
  10. Re: HELP Excel Formula: concatenate if cells (col) is not blank

    Try


    =IF(OR(H1="",K1=""),"",H1&K1)
  11. Replies
    5
    Views
    62

    Re: if..then..else error vba

    Also, make sure you declare ALL variables

    dim ws as worksheet, lstrow as long
    Set ws = ActiveSheet
    lstrow = ws.UsedRange.Rows.Count
  12. Re: Alternate table row colours not changing in one column

    Try


    Sub MM1()
    Dim r As Long
    For r = 6 To Range("A" & Rows.Count).End(xlUp).Row Step 2
    Rows(r).EntireRow.Interior.ColorIndex = 2
    Next r
    End Sub
  13. Thread: Countif

    by Michael M
    Replies
    4
    Views
    129

    Re: Countif

    You'll have to provide a better data sample than that !!
    But a stab in the dark


    =COUNTIF(B2:B3,Sheet2!A1)
  14. Re: Run time error 1004 in VBA Code - the password you supplied is not correct

    Just run it independently of the other code.
    If the code "isn't working" then the password to unlock the sheets is incorrect.....and with that we can't help you, as we don't assist in breaking /...
  15. Replies
    8
    Views
    149

    Re: Trouble Using Formulas in VBA

    It looks like you are trying to do a datediff between Range("F11") against a range of cells


    Off_Calc = DateDiff("m", ProformaDate.Value, Off_Since.Value)

    If you want to do that you will need...
  16. Thread: Countif

    by Michael M
    Replies
    4
    Views
    129

    Re: Countif

    Can you post a small sample of your data....and what the outcome would be from that data ??
  17. Replies
    9
    Views
    115

    Re: Cleaning Data - HELP!

    Simple question really....post the sample dataset, in the first post AFTER your lines had been deleted.
    That way we see a before and after result...

    But I see Akuini has given you a...
  18. Replies
    9
    Views
    115

    Re: Cleaning Data - HELP!

    There seems to be more questions than answers !!
    Can you post the above data set AFTER the lines are deleted /
    and
    Is the data sorted ?
  19. Re: Run time error 1004 in VBA Code - the password you supplied is not correct

    You could Unprotect ALL sheets with code

    Sub MM1()
    Dim ws As Worksheet
    For Each ws In Worksheets
    With ws
    .Unprotect "SSE"
    End With
    Next ws
    End Sub
  20. Re: Run time error 1004 in VBA Code - the password you supplied is not correct

    Review Tab >> Changes >> Unprotect sheet >> Input password.
    Makes sure that Caps lock isn't on !
  21. Replies
    5
    Views
    117

    Re: Young whiz brain required

    Also, have you considered using Windows Task Scheduler ??
    Here's a you tube of it's use

    https://www.youtube.com/watch?v=ii59euBCux0
  22. Replies
    5
    Views
    117

    Re: Young whiz brain required

    Not sure that I follow, but could you not simply run a timer macro say every hour or 2 hours
    Maybe

    If your macro is called MM1

    Insert in 1st line of code in MM1


    Application.OnTime Now +...
  23. Re: Hide Multiple number of rows based on a value

    Ok, if line 1000 is fixed you can use


    Sub MM1()
    Dim S As Range
    Set S = Sheets("Summary").Range("H10")
    Sheets("Testing Records").Rows(S+1 & ":1000").EntireRow.Hidden = True
    End Sub
  24. Re: VBA to see if a column contains a certain string

    There is nothing in that code that affects the colour that i can see !!
  25. Re: Hide Multiple number of rows based on a value

    How about


    Sub MM1()
    Dim lr As Long, r As Long, S As Range
    lr = Sheets("Testing Records").Cells(Rows.Count, "A").End(xlUp).Row
    Set S = Sheets("Summary").Range("H10")
    Sheets("Testing...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4