Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    3
    Views
    101

    Re: Table: Number of Rows

    Sorry, with over 15 hundred posts, I assumed you would be familiar with variables, my bad.
    Add the red line and use the variable x


    '
    Set tbl = ActiveSheet.ListObjects("Table1")

    x =...
  2. Replies
    3
    Views
    101

    Re: Table: Number of Rows

    from https://www.thespreadsheetguru.com/blog/2014/6/20/the-vba-guide-to-listobject-excel-tables


    'Expand Table size by 10 rows
    Set tbl = ActiveSheet.ListObjects("Table1")

    Set rng =...
  3. Re: Creating a digital In/Out accountability tracker...setting status to in/out automatically

    Upload your file to somewhere like box and share a link to it.
  4. Re: Need Help - New to VBA, looking to hide rows, based on cell contents

    You could possibly filter rather than hide


    Sub FilterOutBlank_B_Rows()
    Dim ws As Worksheet
    Dim lr As Long
    Set ws = Sheets("Sheet2")
    With ws
    'find very last used cell
    lr =...
  5. Re: How to Paste Special into the next empty row

    Try


    Range("N" & Rows.Count).End(xlUp).Offset(1).value = Range("C10").value
  6. Re: How to check If range contains more than 6 spaces?

    Glad to have helped.... but

    That's not going to work as you are setting NumRow = blankRows at a time when blankRows = 0 and it will never change, you will always get the "Less than 3" message box....
  7. Re: How to check If range contains more than 6 spaces?

    Try this

    Sub Add_data()

    Dim LastRow As Long, blankRows As Long
    Dim R As Long, StartRow As Long
    Dim rng As Range, cel As Range
    Dim col As Variant

    col = "Z"
  8. Re: How to check If range contains more than 6 spaces?

    (offset 0,0) = no offset

    Your original code loops up column Z looking for cells that = D35
    when it finds one, if cell E35= "Great",
    you want to look at the range of cells in column AB, from the...
  9. Re: How to check If range contains more than 6 spaces?

    try this

    ... And Application.WorksheetFunction.CountIf(.Cells(R, col).Offset(0, 2).Resize(20), "") >= 6 Then
  10. Re: Advanced Filter Coming Up Empty Despite Values Existing

    I don't know if what you have should work.

    Did you test if the advanced filter works using a new sheet and all headers for criteria ?
    Copy the entire ws_data header row to the new sheet and put...
  11. Re: Advanced Filter Coming Up Empty Despite Values Existing

    Is the criteria to be AND, records with both, OR records with either ?

    criteria on same line for AND
    separate lines for OR
  12. Re: I need VBA code to copy data from grid schedules to teams worksheets

    This should do that


    Sub SchedToTeamSheets()

    Dim cel As Range, fndRng As Range
    Dim teamSht As Worksheet, teamName As String

    For Each cel In Sheets("NFL GRID...
  13. Re: VBA help - Showing Username of Person Updating Spreadsheet

    perhaps something like this


    Sub testing()
    Dim excelUserName As String, usr

    excelUserName = Application.UserName

    If InStr(excelUserName, " ") Then
    usr = Split(excelUserName, "...
  14. Re: VBA combine advanced filter and dynamic range

    Use the Worksheet_Change event of Sheet1 with the target being the cell the month number is entered into to filter the Raw Data table.
    Use the macro recorder while manually filtering the table to...
  15. Replies
    2
    Views
    103

    Re: Cannot make this script work!!!!!

    wb.SaveAs strFolder & "Master" & n & ".xlsx"
  16. Replies
    1
    Views
    133

    Re: looking for a simple solution

    This can be done with an event macro.
    Right click on the Week1 sheet tab and select View Code.
    Copy and paste this into the pane on the right.


    Private Sub Worksheet_Change(ByVal Target As...
  17. Replies
    9
    Views
    238

    Re: VBA: Macro won't run

    Was this code pasted into the sheet module or a standard module ?
  18. Replies
    12
    Views
    313

    Re: Help with VBA code

    try this

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim ans As Long, rng As Range
    Set rng = ActiveSheet.ListObjects("npss_quote").ListColumns(1).Range
    If Not Intersect(Target, rng)...
  19. Replies
    12
    Views
    313

    Re: Help with VBA code

    Your current code will leave events disabled if you delete an existing value in column A
    try this

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim ans As Long
    If Not...
  20. Re: Recording Date/Time from 1 column to another whenever a cell changes

    What happens if you add another worksheet to store the value of the A1 cell, I used Sheet2 here,
    and use the Worksheet_Calculate event on the A1 sheet ?

    Private Sub Worksheet_Calculate()
    Dim...
  21. Re: Recording Date/Time from 1 column to another whenever a cell changes

    @Olyn01
    even though what's displayed in your A1 cell changes, what's actually in the cell, the formula =Data!I114 doesn't, therefore no change to trigger the event.

    Likely your software reading...
  22. Replies
    5
    Views
    165

    Re: VBA and pasting into a table

    Oops. Bed is a range you've already set, not a named range, so it's
    Bed.Copy
  23. Replies
    5
    Views
    165

    Re: VBA and pasting into a table

    try this



    Dim sht2 As Worksheet
    Dim oLo As ListObject
    Dim oNewRow As ListRow

    Set sht2 = Sheets("Sheet2")
    Set oLo = sht2.ListObjects(1) 'the first table on this sheet
  24. Replies
    5
    Views
    165

    Re: VBA and pasting into a table

    Add a new row to the table and paste into it.
    See https://www.jkp-ads.com/Articles/Excel2007TablesVBA.asp?AllComments=True
    especially the Inserting rows and columns part and oNewRow.
  25. Thread: Code to copy

    by NoSparks
    Replies
    2
    Views
    126

    Re: help with code to copy

    A couple of web pages with good info for dealing with tables

    https://www.thespreadsheetguru.com/blog/2014/6/20/the-vba-guide-to-listobject-excel-tables...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4