Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I'm looking for a simple vba code to devide the whole column with spesific value? example devide column A with 1000 without any temporary cell and exclude th empty cell in the column. best regards Run -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
before we go into VBA you may consider the following procedu - enter 1000 in an empty cell and copy this cell - select your target range - hit F5, click 'Special' and choose 'Constants' - goto 'Edit - Paste Special and choose the action 'Divide' Now the VBA way: sub divide_all dim rng as range dim cell as range dim divisor set rng = selection divisor =1000 for each cell in rng -----Original Message----- Hi I'm looking for a simple vba code to devide the whole column with a spesific value? example devide column A with 1000 without any temporary cell and exclude the empty cell in the column. best regards Rune --- Message posted from http://www.ExcelForum.com/ . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
sorry the VBA code got interrupted. Try sub divide_all() Dim rng as range Dim cell as range dim divisor set rng = selection divisor = 1000 application.screenupdating=false for each cell in rng if isnumeric(cell.value) then cel.value=cell.value/divisor end if next application.screenupdating=true end sub -----Original Message----- Hi I'm looking for a simple vba code to devide the whole column with a spesific value? example devide column A with 1000 without any temporary cell and exclude the empty cell in the column. best regards Rune --- Message posted from http://www.ExcelForum.com/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sum and devide with not null value | Excel Discussion (Misc queries) | |||
Charte - how to devide the axes into 2 sones | Charts and Charting in Excel | |||
devide by 1000 | Excel Discussion (Misc queries) | |||
Cell with numbers and names, need to devide them | Excel Discussion (Misc queries) | |||
devide by 0 error | Excel Worksheet Functions |