Search notes:

Excel Object Model: Application.Selection

The application.selection returns the currently selected object, for example a range or picture object.
The object type which selection refers to can be determined with typename(selection) which returns Range, Picture etc.
When the current selection changes, the worksheet event selectionChange is fired.
A range can be selected with the range.select method.

VBA example

sub main()

    range("b3:c5").select

  '
  ' After selecting a range, application.selection accordingly
  ' is a range. typeName(…) prints "Range".
  '
    debug.print typeName(application.selection)

  '
  ' We can now use application.selection to change
  ' the properties of the selected range
  '
    with application.selection
        .font.name      = "Courier New"
        .numberFormat   = "0.000"
        .interior.color = rgb(220,220,255)
    end with

end sub
Github repository about-MS-Office-object-model, path: /Excel/Application/selection.bas

Using the immediate window to iterate over all selected cells and do something with the cell

In order to quickly query or modify the selected cells in the immediate window, the following loop is a starting point:
for each for each c in selection: debug.print(c.address): next c

See also

window.rangeSelection
Turn the values of the selected range into SQL insert statements.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1758194177, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/Office/Excel/Object-Model/Application/selection/index(81): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78