Display highlighted cells dimensions

anas_hilow

New Member
Joined
Sep 26, 2013
Messages
2
Hello,

We are working on a warehouse layout, which has huge floorspace, using excel spreadsheet. the layout scale is good enough to represent each square cell as One Square foot. We're trying to measure certain areas by highlighting group of cells, no matter if they contain values or blank ones, so the x and y axis are displayed at on of the bottom corners of the cells selection and constantly changes the more highlighted cells are selected. For example if you highlight B17 through L23, it is actually "11" cells in the x direction and "7" cells in the y direction which makes it easy to calculate the highlighted area (11' * 7' = 77 ft^2) and promptly changes these values the more highlighted cells would change. I hope there's simple easy method to do it without using VBA or macros or certain codes, otherwise I'm good with them.

Thank you and have a nice weekend ahead!

Anas
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Right-click the tab of interest, select View Code, and paste this in the window that opens:

Code:
Private Sub Worksheet_Activate()
  If TypeOf Selection Is Range Then
    Application.StatusBar = Selection.Columns.Count & " x " & _
                            Selection.Rows.Count
  Else
    Application.StatusBar = False
  End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If TypeOf Selection Is Range Then
    Application.StatusBar = Selection.Columns.Count & " x " & _
                            Selection.Rows.Count
  Else
    Application.StatusBar = False
  End If
End Sub

Private Sub Worksheet_Deactivate()
  Application.StatusBar = False
End Sub
Do Alt+Q to return to Excel. Look at the status bar as you change the selection.
 
Upvote 0
Thanks!! it worked ... Actually I am using Microsoft Office 2013, view code icon is displayed at the "Controls" menue under the "Developer" tab. Also I had to change the file format into Macro-Enabled excel (xlsm) instead of the regular (xlsx) file format.

Thanks again!

Right-click the tab of interest, select View Code, and paste this in the window that opens:

Code:
Private Sub Worksheet_Activate()
  If TypeOf Selection Is Range Then
    Application.StatusBar = Selection.Columns.Count & " x " & _
                            Selection.Rows.Count
  Else
    Application.StatusBar = False
  End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If TypeOf Selection Is Range Then
    Application.StatusBar = Selection.Columns.Count & " x " & _
                            Selection.Rows.Count
  Else
    Application.StatusBar = False
  End If
End Sub

Private Sub Worksheet_Deactivate()
  Application.StatusBar = False
End Sub
Do Alt+Q to return to Excel. Look at the status bar as you change the selection.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top