{"id":5123,"date":"2020-03-26T14:17:12","date_gmt":"2020-03-26T14:17:12","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=5123"},"modified":"2024-03-30T00:03:06","modified_gmt":"2024-03-30T00:03:06","slug":"select-range-using-variables","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/vba\/select-range-using-variables\/","title":{"rendered":"Selecting a Range Using Variables"},"content":{"rendered":"\n
You can select a range in Excel using the range function:<\/p>\n\n\n\n
Sub selectRange()\n Range(\"B2:E10\").Select\nEnd Sub<\/code><\/pre>\n\n\n\n
This code selects cells between columns B2<\/strong> and E10<\/strong>.<\/p>\n\n\n\n