+ Reply to Thread
Results 1 to 16 of 16

grid formula

  1. #1
    Registered User
    Join Date
    10-23-2013
    Location
    essex
    MS-Off Ver
    Excel 2003
    Posts
    81

    grid formula

    I need a formula to alter sizes on a grid which will then give me the appropriate cost from the grid , cells B1 through to E1 would be widths going up at 150mm at a time and cells A2 through to A5 would be the heights going up at 150mm a time where these cross there is an appropriate cost , by altering any size how can i get the cost to change please

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: grid formula

    What do you mean by "altering the size"? Do you want to increase or decrease the 150mm increment in either the width or the height (or both) and get the prices to adjust in proportion, or do you want to specify a particular size in another pair of cells and get the price of that size returned to another cell?

    It might help if you posted an example workbook. (see the FAQ to find out how)

    Pete

  3. #3
    Registered User
    Join Date
    10-23-2013
    Location
    essex
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: grid formula

    hi pete
    its the second option , its for conservatory roofs
    i have the width in cell K6 & the depth in I6 , so when i change the sizes in these cells i need the prices taken off the appropriate cells in the cost grid

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: grid formula

    I would still like to see a sample workbook, as 5 columns wide and 5 rows deep at 150mm each would not give you a very big roof.

    Pete

  5. #5
    Registered User
    Join Date
    10-23-2013
    Location
    essex
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: grid formula

    i have attached an actual sample of price list , what i need is as the sizes in H1 & J1 change i need the price from the grid to be entered in a different cell.
    the grid is in 250mm stages , so once over half way the next highest price is charged ie the roof price at the sizes in H1 & J1 should give a price of 2610
    Attached Files Attached Files

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: grid formula

    In the attached file I have put this formula in L1:

    =INDEX($B$6:$K$13,MATCH(CEILING(J1-0.124,0.25)*1000,$A$6:$A$13,0),MATCH(CEILING(H1-0.124,0.25)*1000,$B$4:$K$4,0))

    to give you the price based on the numbers in H1 and J1 (4.25 and 2.85 in the example). 2.85 is closer to 2.75 than 3.00, so the answer given is 2493, but the changeover occurs at the mid-point.

    Hope this helps.

    Pete
    Attached Files Attached Files
    Last edited by Pete_UK; 10-25-2013 at 08:11 PM.

  7. #7
    Registered User
    Join Date
    10-23-2013
    Location
    essex
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: grid formula

    brilliant , thank you very much , just as an after thought is there a way of adding the grid sizes to the formula as a look up type thing please.

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: grid formula

    I'm not really sure what you mean. Do you want the actual sizes used by the formula? If so, you could put this formula in H2:

    =IF(H1="","",CEILING(H1-0.124,0.25))

    and this one in J2:

    =IF(J1="","",CEILING(J1-0.124,0.25))

    If that is not what you mean, please give an example of what you need.

    Hope this helps.

    Pete

  9. #9
    Registered User
    Join Date
    10-23-2013
    Location
    essex
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: grid formula

    for example the base formula i used =if(j42="yes",(lookup(h42,{9,9.5,10},{"1564","1621","1704"})),if(j42="no","0")) this is a shortened version ,the 9 and 9.5 etc are the sizes and the 1654 etc are the costs , could the roof sizes and costs be inserted into a similar formula

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: grid formula

    So, do you mean that you want to include the numbers from the grid within the formula and dispense with the grid? If so, I wouldn't advise it. The advantage of using a table of data is that if one or more values change then you only need to change them within the table - the formula remains the same. If you include the values within the formula then it could be quite difficult to make the necessary changes if the data changes.

    But, if you want to go that route, you can set up 2-D arrays by separating the rows using a semi-colon, so an array for your costs would look like this:

    {1674,1723,1795,1868,1948,2042,2114,2197,2267,2338;1778,1841,1925,1995,2065,2174,2305,2314,2398,2470;1901,1971,2042, .... }

    and so on for the rest of the data. That would replace the $B$6:$K$13 in the formula I gave you. You would also need to replace the ranges $A$6:$A$13 and $B$4:$K$4 with 1-D arrays.

    Hope this helps.

    Pete

    P.S. - If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, I would like to inform you that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  11. #11
    Registered User
    Join Date
    10-23-2013
    Location
    essex
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: grid formula

    hi pete i have run in to a further problem most of the roofs are ok except 2 , i have attached the work book
    formula i have entered for this roof is =IF(H1="YES",(INDEX($B$5:$H$8,MATCH(CEILING(K6-0.001,0.25)*1000,$A$5:$A$8,0),MATCH(CEILING(I6-0.001,0.25)*1000,$B$3:$H$3,0))),IF(H1="NO","0")) but this returns N/A , could you tell me were im going wrong please
    brian
    Attached Files Attached Files

  12. #12
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: grid formula

    I can't see that formula in the attached workbook, but I do see that you have changed the increment for the width, and you have also changed where the sizes are entered.

    If you are using H1 so that it can only contain Yes or No, then you don't need to check for the No condition after the Yes, so you can do something like this:

    =IF(H1="Yes", size_calculation, 0)

    where size_calculation is the formula that I gave you before (or modified to suit your latest changes).

    Hope this helps.

    Pete

  13. #13
    Registered User
    Join Date
    10-23-2013
    Location
    essex
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: grid formula

    pete
    i have re sent the workbook with the formula in it , this returns #n/a , i have changed the original 0.124 to 0.001 as this changes price as soon as it moves up a cell and the increments are different as it is a different roof is this any clearer , the error seems to be in the match,ceiling part but i cannot sort it
    brian
    Attached Files Attached Files

  14. #14
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: grid formula

    Change the formula in B10 to this:

    =IF(H1="YES",(INDEX($B$5:$H$8,MATCH(CEILING(E1*1000-1,250),$A$5:$A$8,0),MATCH(CEILING(B1*1000-1,600),$B$3:$H$3,0))),0)

    Note that I have moved the *1000 into the CEILING functions, so now you are subtracting 1 (mm) from those measurements before rounding them up. Note also that the increments within the CEILING functions (coloured red and blue) are now in mm, and if H1 does not equal Yes then the formula returns zero - you could change the final 0 to "" if you wish to have a blank cell.

    Hope this helps.

    Pete

  15. #15
    Registered User
    Join Date
    10-23-2013
    Location
    essex
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: grid formula

    can anyone help with the attached problem i have attached the installation workbook , i am getting the #n/a again is this because some of the values are in hundreds and some are in thousands in the costs , the formula is enclosed, i am so close to finishing my project
    regards
    brian
    Attached Files Attached Files
    Last edited by bdf1965; 11-01-2013 at 09:11 AM. Reason: unsolved at present

  16. #16
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: grid formula

    I can see the #N/A value in M4 of this latest file, but there is no formula in there. What formula were you using? Where have the cells gone in which you specify the size you are interested in?

    Pete

+ 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. [SOLVED] Need a formula which will show a payout grid.
    By aj34321 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-23-2013, 03:12 AM
  2. Replies: 2
    Last Post: 12-15-2011, 04:14 AM
  3. formula to find distance across points on a grid
    By Powrpak in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-24-2008, 04:35 PM
  4. Formula Question:search the entire grid
    By livifivil in forum Excel General
    Replies: 1
    Last Post: 04-17-2007, 02:32 PM
  5. I need to convert grid.doc to an Excel Grid.
    By suavejohn in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-01-2005, 02:05 PM

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