+ Reply to Thread
Results 1 to 10 of 10

IF between A and B then value equals C

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    IF between A and B then value equals C

    I am trying to compose a zoom level for a map URL based on acres.

    So if less than 0.5 I want zoom to =20.

    I can figure that much out =IF(A2<0.5, 20)

    What would create formula to say if between 0.5 and 3 acres then zoom equals 19

    How could I create formula that would encompass everything i.e.

    If less than 0.5 zoom = 20
    if between 0.5 and 5 zoom = 19
    if between 5 and 20 zoom = 18
    if between 20 and 50 zoom = 17
    if between 50 and 200 zoom = 16
    if between 200 and 500 zoom = 15
    if between 500 and 1000 zoom = 14
    if between 1000 and 5000 zoom = 13
    if greater than 5000 zoom = 12

    so that I could simply copy formula all the way down instead of sorting and creating new formula for each range of acres.

    For some reason it is not allowing me to attach XLS, but here is screenshot of what I am working with. the Longitude and Latitude columns are irrelevant, only working with the Acres column.
    zoom-sample.png
    Last edited by jambog; 03-10-2016 at 02:21 PM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,803

    Re: IF between A and B then value equals C

    I think a lookup function with a lookup table would be a better, easier choice: https://support.office.com/en-us/art...__toc309306714
    If you are unfamiliar with lookup functions, then start with the VLOOKUP() function. Study MS's example, both for the table and the formula. Pay particular attention to how it describes the behavior dictated by the 4th argument of the VLOOKUP() function.
    Let us know what you have trouble understanding.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2202
    Posts
    1,468

    Re: IF between A and B then value equals C

    for some reason it wont allow me to post the formula....

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2202
    Posts
    1,468

    Re: IF between A and B then value equals C

    alright i couldnt paste the formula directly on here for some reason so i put it into a worksheet. the formula is in the highlighted cell
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: IF between A and B then value equals C

    Yes, that's happened to me and I posted it as an image (hey if it's good enough for others...)
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    Re: IF between A and B then value equals C

    Nailed it. Thanks!

    Here was my solution, hope it can help someone else.
    success.png
    Attached Images Attached Images

  7. #7
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    Re: IF between A and B then value equals C

    Thanks, sorry I thought you were being a smart aleck in your first post implying that I was too lazy to upload the XLS.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: IF between A and B then value equals C

    try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    where A2: (acres value)

  9. #9
    Registered User
    Join Date
    07-22-2008
    Location
    WV
    Posts
    70

    Re: IF between A and B then value equals C

    for some reason it wont allow me to post the formula....
    Thanks for the solution, sorry I thought you were bring a smart aleck in your first post implying I was too lazy to upload the XLS. Jumped the gun instead of seeing your second post.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: IF between A and B then value equals C

    If problem is resolved mark thread as solved. Thank you.

    btw, thanks for rep

+ 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] If equals
    By jlo33 in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 08-14-2014, 12:33 PM
  2. Counting if 1 cell equals X and another equals Y
    By SianPE in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-08-2014, 06:39 AM
  3. if column B equals "cash" then column H equals 0
    By im3d in forum Excel General
    Replies: 4
    Last Post: 04-26-2011, 04:43 PM
  4. if a:a (range) equals january and c:c equals gas then add g:g ($)
    By BCOz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-29-2005, 03:45 PM
  5. Replies: 1
    Last Post: 06-01-2005, 07: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