Select Dynamic Range

rodrigo_m_almeida

New Member
Joined
Jan 13, 2022
Messages
42
Office Version
  1. 2021
Platform
  1. Windows
Good afternoon people
Does anyone have any ideas
How to select to the last row and column
without defining
Captura de tela 2023-01-13 151734.png

I need to select this area...
I just won't know how many columns and rows I'll have
I'm using
VBA Code:
Range("B2:O" & Range("A1").End(xlDown).Row).Select
How can I adapt this code to also select the last column, just like the line, without having to declare ???
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try this:

VBA Code:
  Range("B2", Cells(Range("A" & Rows.Count).End(3).Row, Cells(1, Columns.Count).End(1).Column)).Select
 
Upvote 0
Solution

Forum statistics

Threads
1,214,929
Messages
6,122,317
Members
449,081
Latest member
tanurai

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top