![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 429
|
Hello,
I have numerical data in column A and that data can vary in terms of number of digits. Sometimes it can be 100, 1000, 10000, 100000 I have written a macro that loops through the rows in column A and divides the values by 10000. I initially wrote it this way because I thought the data was always a five digit number and I wanted my value to be no greater than a two digit number. Is there a way that in my loop I can ask it to look for the value first and then decide what value divisor to use? Thanks, Lino |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
If you can incorporate in your macro, you could use: =A1/(10^LEN(A1)) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|