+ Reply to Thread
Results 1 to 10 of 10

[SOLVED]If/then range formula help

  1. #1
    Registered User
    Join Date
    08-06-2009
    Location
    New Orleans
    MS-Off Ver
    Excel 2007
    Posts
    4

    [SOLVED]If/then range formula help

    I am trying to find an easier way to write an IF/And/Then formula that increases on itself by 1. =IF(C2<=C21,B21*1,IF(AND(C2>=(C21+1),C2<=C21*2),B21*2,IF(AND(C2>=(C21*2+1),C2<=C21*3),B21*3)))..... is what i have so far, but I need to do this to at least the 30th power. Is there a way to do this quickly??
    Last edited by rbigrob517; 08-07-2009 at 01:51 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If/then range formula help

    Have a sample workbook showing the actual data you're trying to manipulate? This would be much easier to resolve if we were looking at the same thing you were.

    So mockup a sample workbook showing the dilemma and your desired results, point out where the results came from if not obvious in your sample data.

    Then click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-06-2009
    Location
    New Orleans
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: If/then range formula help

    Eliot Miracle.xlsx

    So this is what i am working on. Cell F21 contains the range formula. I need to be able to see how many rolls of photo paper (cell C21) in need to buy if i sell X amount in cell C2.
    Last edited by rbigrob517; 08-07-2009 at 10:43 AM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If/then range formula help

    Now explain what the manual math would be in F21 based on all of the current cell values. What would the answer be and why?

    What are "roles"? Did you mean "rolls" as in "rolls of paper"?

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: If/then range formula help

    Perhaps:

    F21: =B21*CEILING(C2/C21,1)

  6. #6
    Registered User
    Join Date
    08-06-2009
    Location
    New Orleans
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: If/then range formula help

    Thanks for the help Ya'll. The Ceiling formula worked great. Still very new to excell and had never seen the Ceilling command until now. Thanks again ya'll.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: If/then range formula help

    Given you're always rounding up to nearest whole number you could use ROUNDUP(C2/C21,0) as opposed to CEILING if preferred (ie if it makes more sense should you come back to review).

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If/then range formula help

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

  9. #9
    Registered User
    Join Date
    08-06-2009
    Location
    New Orleans
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: If/then range formula help

    Added feedback and [solved] original post. Thanks again. I will play around with the ceiling and roundup to see how i can best use them in the future.

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If/then range formula help

    In that case, don't forget the reciprocal function FLOOR() which I find I use far more often than CELILING(), though both are irreplaceable. Cheers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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