+ Reply to Thread
Results 1 to 3 of 3

Thread: If Then

  1. #1
    impressions
    Guest

    If Then

    I am trying to program a cell to look at the total in another cell which has
    unlimited possibilities. From the total I want to have it look at a total
    and if it is <= or >= to a number then it assigns a value. e.g. If the
    total is 225 in one cell then this is greater than 200 and less than 250 so
    it equals $125. Thanks for your help!

  2. #2
    Vasant Nanavati
    Guest

    Re: If Then

    =IF(AND(A1<=250,A1>=200),125,"")

    --

    Vasant

    "impressions" <impressions@discussions.microsoft.com> wrote in message
    news:564C0F22-2048-4F7B-8C31-B31FFCB75E64@microsoft.com...
    > I am trying to program a cell to look at the total in another cell which

    has
    > unlimited possibilities. From the total I want to have it look at a total
    > and if it is <= or >= to a number then it assigns a value. e.g. If the
    > total is 225 in one cell then this is greater than 200 and less than 250

    so
    > it equals $125. Thanks for your help!




  3. #3
    Nick Hodge
    Guest

    Re: If Then

    You can use a Select Case construct like so

    Select Case Range("A1").Value
    Case Is <10
    'Do This
    Case is <=20
    'Do That
    Case is <=30
    'Do Something Else
    Case Else
    'Do Something Totally Different
    End Select
    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS

    "impressions" <impressions@discussions.microsoft.com> wrote in message
    news:564C0F22-2048-4F7B-8C31-B31FFCB75E64@microsoft.com...
    >I am trying to program a cell to look at the total in another cell which
    >has
    > unlimited possibilities. From the total I want to have it look at a total
    > and if it is <= or >= to a number then it assigns a value. e.g. If the
    > total is 225 in one cell then this is greater than 200 and less than 250
    > so
    > it equals $125. Thanks for your help!




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.2.0