About 49,800,000 results
Open links in new tab
  1. How to show current user name in a cell? - Stack Overflow

    In most of the online resource I can find usually show me how to retrieve this information in VBA. Is there any direct way to get this information in a cell? For example as simple as =ENVIRON('Use...

  2. Properly Handling Errors in VBA (Excel) - Stack Overflow

    Block 2 looks like an imitation of a Try/Catch block. It should be okay, but it's not The VBA Way. Block 3 is a variation on Block 2. Block 4 is a bare-bones version of The VBA Way. I would strongly advise …

  3. Using "If cell contains" in VBA excel - Stack Overflow

    23 This will loop through all cells in a given range that you define ("RANGE TO SEARCH") and add dashes at the cell below using the Offset() method. As a best practice in VBA, you should never use …

  4. automatically execute an Excel macro on a cell change

    How can I automatically execute an Excel macro each time a value in a particular cell changes? Right now, my working code is: Private Sub Worksheet_Change(ByVal Target As Range) If Not Inters...

  5. VBA: Selecting range by variables - Stack Overflow

    I want to select the formatted range of an Excel sheet. To define the last and first row I use the following functions: lastColumn = ActiveSheet.UsedRange.Column - 1 + ActiveSheet.UsedRange.Columns.

  6. vba - Continue For loop - Stack Overflow

    It sounds like we agree that, for those looking for a more general approach to VBA's lack of a "continue" statement, the alternative answers below have advantages.

  7. How can I copy columns from one sheet to another with VBA in Excel ...

    Jan 2, 2010 · How can I copy columns from one sheet to another with VBA in Excel? Asked 15 years, 11 months ago Modified 10 years, 5 months ago Viewed 315k times

  8. excel - VBA - Range.Row.Count - Stack Overflow

    Sub test() Dim sh As Worksheet Set sh = ThisWorkbook.Sheets("Sheet1") Dim k As Long k = sh.Range("A1", sh.Range("A1").End(xlDown)).Rows.Count End Sub What happens is this: We count …

  9. Find last used cell in Excel VBA - Stack Overflow

    See my solution based on UsedRange and VBA arrays to find the last cell with data in the given column -- it handles hidden rows, filters, blanks, does not modify the Find defaults and is quite performant. …

  10. Excel VBA - Pivot table filter multiple criteria - Stack Overflow

    Excel VBA - Pivot table filter multiple criteria Asked 8 years, 9 months ago Modified 2 years, 9 months ago Viewed 35k times