Stop searching. Start learning and developing your excel skills.
Macro
VBA
Formula
Function
Shortcut
Tricks

» » VBA Function To Combine Range

VBA Function To Combine Range

June 03, 2017 |
The Code:
Dim rng As Range
Dim rngA As Range
Dim rngB As Range
Set rngA = ActiveSheet.Range("A3:V3")
Set rngB = ActiveSheet.AutoFilter.Range
Set rng = Application.Union(rngA, rngB)
Where:
  1. Column size for rngA = rngB
  2. A3:V3 is the header of the autofilter
Note:
  1. Normally the function is used to insert the range in email as a body

No comments:

Post a Comment