Get the current cell in Excel VB
excel, vba
Solution
Have you tried:
For one cell:
ActiveCell.Select
For multiple selected cells:
Selection.Range
For example:
Dim rng As Range
Set rng = Range(Selection.Address)
Problem
I have a small script in Excel/VB that I'm trying to get working. All I want to do is select a dynamic range of data to copy but I can't seem to find any help/code on how to get the grid data (like A11). Here is code I have from macro recording that selects the range of data: ``` Range("D291:D380").Select ``` I was hoping I could just do `Range(Current).Select` or something but that doesn't work. How do I get the current cell using VBA?