Hi, I have multiple excel sheets each with a great number of data. The problem with the data is that I have a mix of Number format and General format. I want to create a macro which divides the number format by 1000. Any links or ideas please?
Hi, I have multiple excel sheets each with a great number of data. The problem with the data is that I have a mix of Number format and General format. I want to create a macro which divides the number format by 1000. Any links or ideas please?
You may read with VBA current format of the cell. so standard loop shall be enough.
if your data are just values (not formulas) you may directly use:
Skip this line, if you prefer to keep previous formatting of changed cells:Please Login or Register to view this content.
Please Login or Register to view this content.
Best Regards,
Kaper
But is it possible to this using macro? I mean, I currently do not have VBA installed and am quite a newbie on macros but still I think I would prefer to use macros at this point in time
vba and macros in Excel are one and the same. To run Kaper's code:
How to install your new code
- Copy the Excel VBA code
- Select the workbook in which you want to store the Excel VBA code
- Press Alt+F11 to open the Visual Basic Editor
- Choose Insert > Module
- Edit > Paste the macro into the module that appeared
- Close the VBEditor
- Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
To run the Excel VBA code:
- Press Alt-F8 to open the macro list
- Select a macro in the list
- Click the Run button
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Please see forum rule #3: in future, please tell us if you have asked the same question elsewhere.
Here is a link to the other forum (please provide these links yourself in future): https://www.excelguru.ca/forums/show...numerical-data
Last edited by AliGW; 10-17-2018 at 07:24 AM.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Alansidman, i managed to do as you instructed and it worked perfectly. Is it possible for me to include the range of columns for this procedure to be done? The first column is date/time and therefore I would prefer this procedure to always skip it
If first column is column A then:
Please Login or Register to view this content.
Stefan - you were asked in post #5 to tell us where else you have posted this query. We have now discovered that you have also posted it here: https://www.mrexcel.com/forum/excel-...ic-values.html
Please be aware that if you continue to ignore our rules and moderation requests, there will be consequences. Please do not do so again. Thank you.
I think that the same question was asked in these three forums but I m not sure. At least I have got the replies from these three total. I won't do it again dnt worry.
I am talking about YOU asking the same thing on multiple forums. You must know where else you have asked the same question, surely?
If you have had useful replies from the other forums that are different to the ones offered here, then please share them here for the benefit of all. This is a public forum that acts as a knowledge base for hundreds of Excel users: if the data is incomplete, then the knoweldgebase fails to work correctly. I hope you understand, therefore, why we and other forums have the cross-posting rule and why we expect you to abide by it.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks