ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   applying math operation across range of cells (https://www.excelbanter.com/excel-programming/361939-applying-math-operation-across-range-cells.html)

yb

applying math operation across range of cells
 
hi,

i have very little excel experience, i have a spreadsheet with a few
large columns (of numbers)

I need to divide each cells amount by 8. Is there a way to reference
the cell itself and divide the original value by 8? Alternatively, but
less useful would be if I can just do a divide by 8 on each value and
lose the original value. There are too many cells to do each one
individually

I tried circular reference with iteration count of 1 but that didn't
work. Thanks in advance.


alf bryn

applying math operation across range of cells
 
One way of doing it:

Sub Macro1()

For Each Cell In Range("B3:C8")

Cell.Offset(0, 4).Value = Cell.Value / 8

Next Cell

End Sub

Will divide the number in every cell in range "B3" to "C8" with 8 and place
the result on the same row as the original number but four columns to the
right of the original column.

Hope this helps

"yb" wrote in message
oups.com...
hi,

i have very little excel experience, i have a spreadsheet with a few
large columns (of numbers)

I need to divide each cells amount by 8. Is there a way to reference
the cell itself and divide the original value by 8? Alternatively, but
less useful would be if I can just do a divide by 8 on each value and
lose the original value. There are too many cells to do each one
individually

I tried circular reference with iteration count of 1 but that didn't
work. Thanks in advance.




Ardus Petus

applying math operation across range of cells
 
Type 8 in an empty cell
EditCopy that cell
Select the range you want to divide by 8
EditPaste special, chech Division

HTH
--
AP

"yb" a écrit dans le message de news:
...
hi,

i have very little excel experience, i have a spreadsheet with a few
large columns (of numbers)

I need to divide each cells amount by 8. Is there a way to reference
the cell itself and divide the original value by 8? Alternatively, but
less useful would be if I can just do a divide by 8 on each value and
lose the original value. There are too many cells to do each one
individually

I tried circular reference with iteration count of 1 but that didn't
work. Thanks in advance.




Rob[_28_]

applying math operation across range of cells
 
Suppose your data is in the range A1:A10 and column B is empty

select cell B1 and type:
"=A1/8" (without speech marks)

Press enter - the value in A1 has been divided.

Select the cell again. Look at the thick black line around the cell which
indicates it is selected, and you will see that the bottom-right corner has
a "fill handle"

Drag the fill handle down to B20 (or the bottom of your data).





"yb" wrote in message
oups.com...
hi,

i have very little excel experience, i have a spreadsheet with a few
large columns (of numbers)

I need to divide each cells amount by 8. Is there a way to reference
the cell itself and divide the original value by 8? Alternatively, but
less useful would be if I can just do a divide by 8 on each value and
lose the original value. There are too many cells to do each one
individually

I tried circular reference with iteration count of 1 but that didn't
work. Thanks in advance.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com