+ Reply to Thread
Results 1 to 7 of 7

Math problem in spreadsheet

  1. #1
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    122

    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.

    In the attached spreadsheet;
    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.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    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.
    Click on the star if you think I helped you

  3. #3
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    122

    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. #4
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    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. #5
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    122

    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. #6
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    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. #7
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    122

    Re: Math problem in spreadsheet

    Doesn't look like it is possible thanks for your help adyteo.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Spreadsheet Math Programming
    By moosedaddi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-14-2011, 01:56 PM
  2. Replies: 3
    Last Post: 02-16-2006, 07:00 AM
  3. [SOLVED] math problem
    By Keven in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. [SOLVED] math problem
    By Keven in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. [SOLVED] math problem
    By Keven in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

Bookmarks

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