![]() |
Visual Basic insert formula
Hi,
I am trying to set a macro to do the following: insert the formula in the active cell (or in each cells selected). Formula: "=round( 'activecell value' ;0)" The activecell could have a number like: 5,68 or a formula: A1+A2. Can someone help! Thanks a lot. |
Quote:
Best way to begin is to use the Macro Recorder. Then edit that code as necessary. David |
Quote:
Hi, as David already told to you, use macro recorder. The following code is made by macrorecorder Sub NoDecimals() Selection.NumberFormat = "0" End Sub *** |
All times are GMT +1. The time now is 10:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com