# Help for excel, calculate division of colums by sums

• late347
In summary, the conversation discusses the creation of a division column (J5-J35) using values from the E and H columns. Despite trying to add a division function through the "add function" button, the results were incorrect. The solution involves formatting the cells as float or double and using a macro to assign the division formula.

#### late347

I have column from E5 -->E35 which contains values for each box.
another column from F5-->F35 contains values for each box

I have a sums column, H5-->H35,, which contains values for the sums between the E and F boxes (E5+F5=H5 ;;; E6+F6=H6 etc...)

I want a division column inside J5-->J35 which contains division such that the dividend = E column and the divisor = H column.
the division should be located inside the J column (J5-->J35) ##J= \frac{E}{E+F}=\frac{E}{H}##

i tried to add function from the "add function" button and "division" but it did not seem to work.

When I drag down the division function, then I only get 1 and 0 as the results of division, even though it is wrong to say that 1/6 = 0

I think I got it done by writing manually into the box what the function would be

late347 said:
i tried to add function from the "add function" button and "division" but it did not seem to work.
When I drag down the division function, then I only get 1 and 0 as the results of division, even though it is wrong to say that 1/6 = 0
1/0's are results of integer type so the cells need to be either float or double formatted.
You can also assign your buttons macros. Something simple like this
JavaScript:
Sub Division()
For i = 5 To 35
answer = Cells(i, "E").Value / (Cells(i, "E").Value + Cells(i, "F").Value)
Next i
End Sub
Now you can insert code similarly for H formula.

## What is Excel and how can it help with calculating division of columns by sums?

Excel is a spreadsheet software developed by Microsoft that is used for organizing and analyzing data. It has a built-in function that allows you to easily calculate division of columns by sums, which can be useful for various data analysis tasks.

## What is the formula for calculating division of columns by sums in Excel?

The formula for calculating division of columns by sums in Excel is =column1/sum(column2). This will divide the values in column1 by the sum of values in column2.

## Can I calculate division of columns by sums for multiple rows in Excel?

Yes, you can use the same formula mentioned above for multiple rows in Excel. Simply drag the formula down to apply it to other rows.

## How can I format the results of my division calculation in Excel?

You can format the results of your division calculation by selecting the cell(s) with the results, right-clicking and selecting "Format Cells". From there, you can choose the desired number format, such as decimal places, currency, or percentage.

## Is there a way to automatically update the division calculation in Excel if the values in my columns change?

Yes, you can use the "AutoSum" feature in Excel to automatically update the division calculation when the values in your columns change. Simply select the cell where you want the result to appear, click on the "AutoSum" button, and select the range of cells you want to divide by the sum.