Super Resize



To create a Range of cells from parameters or another Range of cells, it is required knowledge of resizing and/or displacement commands. The main ones being Resize and Offset.

VBA Offset

The original FREE picture resize and crop tool since 2005! Resize, crop, compress, add effects to your images, photos, and screenshots for free! Resize your images with preserving the quality either one by one or whole bunch of them. Resize your photos at single click to the same size or different sizes, with preserving photo quality to the best. Resizing photos made easy with this easy-to-use lite weighted app.

Super resize video

Offset is a command for moving, either horizontally or vertically, a Range of cells.

The above code will select cell 'C3'.

Super Size Me Facts

  • RowOffSet: integer that shifts rows downwards as it value increases
  • ColumnOffset: integer the shifts columns to the right as its value increases

It is not necessary to use the terms: RowOffSet and ColumnOffSet. Just as in a function, you can use only the numbers as parameters (in the order RowOffSet and then ColumnOffset), making the parameterization implicit.

The above code will select cell 'A1', since negative numbers mean retreating rows or columns.

The advantage of explicit parameterization (using the RowOffSet and ColumnOffSet terms) is that it allows you to change the order in which the parameters are written.

A Range can contain more than one cell, and this range can be shifted with Offset.

The above code will select the cells from 'C3' to 'E5', starting from the reference range from 'B2' to 'D4'.

VBA Resize

Resize is a command for creating a new Range starting from the lowest-row cell and the lowest-column of the reference Range(even if it has only one cell).

The above code will select the cells from 'A1' to 'B2'.

  • RowSize: integer that determines the amount of rows to expand from the lowest row and column cell to form a Range(expanding from top to bottom).
  • ColumnSize: integer that determines the amount of columns to expand from the lowest row and column cell to form a Range(expanding from left to right).

In the same way as the Offset command, you can omit the parameters name (RowSize, ColumnSize).

The above code will select the cells from 'B2' to 'D4'.

The Resize property will always use the lower-line and lower-column cell as the starting point. The size of the Range reference is irrelevant:

In this selection the lower-line and lower-column cell will be 'A1'. Thus, the code will then select the cells from 'A1' to 'B2'.

Unlike the Offset command, Resize does not accept negative values.

VBA Resize along with VBA Offset

You can use the Resize and the Offset commands together in a single line of code:

Although in this case the final Range is the same, the order of execution resolves from left to right.

Consolidating Your Learning

Suggested Exercises

FIRST STEPS

FUNDAMENTALS

RANGE

USERFORM

DEEPENING

SuperExcelVBA.com is learning website. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. All Rights Reserved.

Excel ® is a registered trademark of the Microsoft Corporation.

Super Resize Image

© 2021 SuperExcelVBA | ABOUT

Thank you for contributing. A message was sent reporting your comment.

  • Perfect Quality

    The best online image resizer to resize your images at the highest quality.

  • Lightning Fast

    This cloud-hosted, highly scalable tool can resize your images within seconds!

  • Easy to Use

    Simply upload your image and enter a target size. It's as easy as that!

  • Works Anywhere

    ImageResizer.com is browser-based (no software to install). It works on any platform (Windows, Linux, Mac).

  • Privacy Guaranteed

    Your images are uploaded via a secure 256-bit encrypted SSL connection and deleted automatically within 6 hours.

  • It's Free

    Since 2012 we have resized millions of images for free! There is no software to install, registrations, or watermarks.

How to resize an image?

  • 1. Click on the 'Select Image' button to select an image.
  • 2. Enter a new target size for your image.
  • 3. Click the 'Resize Image Now' button to resize the image.