ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to divide by zero (https://www.excelbanter.com/excel-programming/393982-macro-divide-zero.html)

LetMeDoIt

macro to divide by zero
 
Greetings.

I believe there is a way in VBA to have a macro divide by 1000 by
specifying a range?

Would it be possible for one of the Excel gurus to provide some sample
code, it would be greatly appreciated. Thank you.

I cannot have a formula in that cell for various reasons.

regards, Chris


Dave Peterson

macro to divide by zero
 
Turn on the macro recorder
Find an empty cell
(I'd use ctrl-End, then down arrow to find an empty cell)
put 1000 in that cell
edit|copy

select the range to adjust
edit|Paste special|check divide

Clear that cell with 1000 in it

Stop the recorder



LetMeDoIt wrote:

Greetings.

I believe there is a way in VBA to have a macro divide by 1000 by
specifying a range?

Would it be possible for one of the Excel gurus to provide some sample
code, it would be greatly appreciated. Thank you.

I cannot have a formula in that cell for various reasons.

regards, Chris


--

Dave Peterson


All times are GMT +1. The time now is 07:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com