# Access Areas in a Range

Learn how to access specific areas in a multiple-area range in a large worksheet with non-contiguous selections using DsExcel.

## Content

In a large worksheet with non-contiguous selections, you can access specific areas in a multiple-area range by using the [getArea](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/IAreas.html#getArea) method of the [IAreas](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/IAreas.html) interface and [getAreas](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/IRange.html#getAreas)) method of the [IRange](/document-solutions/java-excel-api/api/online/com/grapecity/documents/excel/IRange.html) interface.
The methods of the **IAreas** interface and the **IRange** interface also represent the area count (number of areas) of the multiple-area range and all the selected ranges in the multiple area range.
In order to access areas in a range, refer to the following example code.

```Java
IRange range = worksheet.getRange("A5:B7, C3, H5:N6");
        
// Access the first area - area1 is A5:B7.
IRange area1 = worksheet.getRange("A5:B7, C3, H5:N6").getAreas().getArea(0);
        
// Set interior color for the first area
area1.getInterior().setColor(Color.GetPink());
        
// Access the second area - area2 is C3.
IRange area2 = worksheet.getRange("A5:B7, C3, H5:N6").getAreas().getArea(1);
        
// Set interior color for the second area
area2.getInterior().setColor(Color.GetLightGreen());
        
// Access the third area - area3 is H5:N6.
IRange area3 = worksheet.getRange("A5:B7, C3, H5:N6").getAreas().getArea(2);
        
// Set interior color for the third area
area3.getInterior().setColor(Color.GetLightBlue());
```