excel visual basic

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Excel Visual Basic

Excel Visual Basic

resolvedResolved · Low Priority · Version Standard

Xavier has attended:
Excel VBA Intro Intermediate course
Excel Advanced - Formulas & Functions course
PowerPoint Intermediate Advanced course

Excel Visual Basic

Why Range uses "" and cells does not?

e.g. Range("A1")

Edited on Tue 19 Feb 2008, 15:59

RE: Excel Visual Basic

Hi Xavier

In Excel it is possible to name Ranges so when you refer to a range in VBA you do so using a string:

If you had named "A1" as "VAT" then in the VBA code you could either write

Range("A1") Or Range("VAT") as they would refer to the same cell

When using the Cells, this refers to the numeric co-ordinates of the cell's position on the worksheet

Cells(Row , Column)

So that Range ("A1") is Row 1, Column 1 which gives us

Cells (1,1)

Hope this helps

Carlos


 

Excel tip:

Filtering Data in an Excel 2010 Worksheet

When you have an Excel Worksheet with masses of data, it's not going to be easy to sift through it. So, in order to view sections of data, you can use the filter tool. Select the cells you want to filter (no need to select the column headers), then click the Home tab on the Ribbon, click Sort and Filter (you will find this in the Editing Section) then click Filter.

You will now see arrows in the top row of all the columns. If you click on an arrow, it will give you some filtering options so you can sort your data into ''Smallest to Largest'' or ''Oldest to Newest'' and so on..

To turn off the filtering, go back to the Home tab and click the Filter button again.

View all Excel hints and tips


Server loaded in 0.08 secs.