Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default range * constant

Can one of you Excel experts tell me how to reduce all cells in a data
array by a factor of 10 (how to multiply all cells in a range by a
constant)?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default range * constant

Hi
- put 10 in an empty cell
- copy this cell
- select your numbers
- goto 'Edit - Paste Special' and choose the action 'Multiply' (or
'Divide')

--
Regards
Frank Kabel
Frankfurt, Germany

"linty" schrieb im Newsbeitrag
om...
Can one of you Excel experts tell me how to reduce all cells in a

data
array by a factor of 10 (how to multiply all cells in a range by a
constant)?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default range * constant

put 10 in a blank cell.

Select that cell and copy it.

Select the cells to be reduced and do

Edit=Pastespecial and select Values and Divide

if you mean you have an array like

varr = Array(1000, 10000, 5000, 2000)

you can do

Sub ABCD()
Dim varr as variant, i as long
varr = Array(1000, 10000, 5000, 2000)
For i = LBound(varr) To UBound(varr)
varr(i) = varr(i) / 10
Next
For i = LBound(varr) To UBound(varr)
Debug.Print i, varr(i)
Next
End Sub




--
Regards,
Tom Ogilvy


"linty" wrote in message
om...
Can one of you Excel experts tell me how to reduce all cells in a data
array by a factor of 10 (how to multiply all cells in a range by a
constant)?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Constant loan payments vs. constant payments of principal lalli945 Excel Worksheet Functions 3 December 20th 06 10:33 PM
Searching a date range to output values according to a constant. Geebz Excel Discussion (Misc queries) 2 December 1st 06 09:34 AM
Searching a date range to output values according to a constant. daddylonglegs Excel Discussion (Misc queries) 0 November 30th 06 08:23 PM
Multiply a Range by a Constant Jim Thomlinson[_3_] Excel Programming 0 November 22nd 04 08:23 PM
Selecting a constant changing Range Michael[_10_] Excel Programming 2 August 14th 03 01:30 PM


All times are GMT +1. The time now is 09:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"