1. ## Math problem in spreadsheet

I have a math problem I am trying to solve in excel. I am trying to lay out a grid of cells in another program and I don't have the math skills to solve it. The cell needs to know its column number and I am trying to achieve this by using is X axis position.

Row 1 is the column number and the result I am looking for
Row 2 is the cell/column width
Row 3 is the X axis position for the cells in that column. The first column starts 10 pixels in from the edge so it's Pos X = 10 + column width / 2
Row 4 is my attempt to mathematically find the column number by its X position. A poor effort but about my level of math
Row 5 is where the result needs to replicate row 1

Then cell size (Row 2) and position on the X axis (Row 3) are known and I need the cells to calculate which column they are in.

Any help would be greatly appreciated.

2. ## Re: Math problem in spreadsheet

If I understand correctly your problem, considering that each column has different width, you cannot calculate the position using the sum of all widths.
If I did not really understand the problem, it may be better if you lay out the math problem instead of showing the excel.

3. ## Re: Math problem in spreadsheet

Hi adyteo I am trying to find each cells column number by using its position or size or both of these. The attached spreadsheet is my workings and attempt to solve it.

4. ## Re: Math problem in spreadsheet

because the widths are different, you need to take into consideration each previous columns' widths. you cannot just calculate based on the total width divided by the column position. the calculation will not include the total width (except maybe for the last column) but all the widths of the previous columns.

5. ## Re: Math problem in spreadsheet

Each cell only has access to it's own width, position, total of all widths and total of all positions. I was trying to figure out a calculation using positions but as you have noticed the distance between positions vary due to the different widths. I don't know if it is even possible to mathematically solve this. I was hoping someone could either solve it or tell me it isn't possible.

6. ## Re: Math problem in spreadsheet

you must know the previous column position in order to be able to mathematically calculate the current column number because just knowing the total width and total number of columns does not allow you to determine the column number due to different widths. Mathematically, at least for me, would be impossible to do it.
if there is a mathematical relation (formula, equation) between the column number and its width, we may try something.

7. ## Re: Math problem in spreadsheet

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1