Perfroming calculations on highlighted cells in Excel
Perfroming calculations on highlighted cells in Excel
(OP)
End goal is this:
I have a large table of numbers, when I highlight a portion of the numbers and click a button a macro will use the highlighted numbers in various calculations. I am looking to do this regardless of what portion of the data I select. This would be like the average, count, sum, etc, data displayed in the status bar at the bottom of the screen, just different calculations.
The calculations and the message box that would appear with the results I think I can figure out, but I am not sure how to call in the highlighted range of numbers. Does anyone know how to do this?
my best guest is:
dim Highlighted as Range
dim answer as double
set highlighted as selection
answer = count(highlighted)
I have a large table of numbers, when I highlight a portion of the numbers and click a button a macro will use the highlighted numbers in various calculations. I am looking to do this regardless of what portion of the data I select. This would be like the average, count, sum, etc, data displayed in the status bar at the bottom of the screen, just different calculations.
The calculations and the message box that would appear with the results I think I can figure out, but I am not sure how to call in the highlighted range of numbers. Does anyone know how to do this?
my best guest is:
dim Highlighted as Range
dim answer as double
set highlighted as selection
answer = count(highlighted)





RE: Perfroming calculations on highlighted cells in Excel
Dan - Owner

http://www.Hi-TecDesigns.com
RE: Perfroming calculations on highlighted cells in Excel
RE: Perfroming calculations on highlighted cells in Excel
forum770: -Engineering spreadsheets