+ Reply to Thread
Results 1 to 5 of 5

Setting the range of numbers, and performing subtraction

  1. #1
    Registered User
    Join Date
    03-28-2014
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Setting the range of numbers, and performing subtraction

    Hello,
    I am creating a range of numbers from 1 to 2000 with increments of 0.5. Then I have to subtract certain range, for example, 100 to 350. So, the result should display, 1 to 95.5 and 350.5 to 2000. How can I do that?
    Thank you

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Setting the range of numbers, and performing subtraction

    Assuming your Numbers is in A1 to A4000
    in D2 type 100 as your start number E2 type 500 as your end number
    in F2 Copy paste below then Hold control and shift together and then Hit enter and then drag down the formula till you get blanks

    =IFERROR(INDEX($A$1:$A$4000,SMALL(IF(NOT(($A$1:$A$4000>=$D$2)*($A$1:$A$4000<=$E$2)),ROW($A$1:$A$4000)),ROW(A1))),"")
    Attached Files Attached Files
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

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

    Re: Setting the range of numbers, and performing subtraction

    How are you creating these numbers; is it in a single column, single row, multiple columns and rows? How are you envisioning this deletion taking place? Do they simply clear the cells? delete and remove blanks so that other values move up?
    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

  4. #4
    Registered User
    Join Date
    03-28-2014
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Setting the range of numbers, and performing subtraction

    The structure of the data is that as follows:
    Let's say the database is for highway mileage maintenance. So the mileage are set as from 1 to 2000 with 0.5 increments. So 1 will be in one cell and 2000 will be in another cell. Everyday, the maintenance team will cover certain amount of mileage. So, for the first day, if the team covers from 100 to 350, the result should be 1 to 95.5 and 350.5 to 2000. Sorry for the first post. I think it doesn't express well.
    Thank you

  5. #5
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Setting the range of numbers, and performing subtraction

    Like this ?

    Formula entered here are array formulas! You need to confirm them by holding control and shift together and then hitting enter key instead of just enter.
    Attached Files Attached Files

+ 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. Replies: 0
    Last Post: 01-29-2014, 02:58 PM
  2. [SOLVED] Going Through Range and Performing If Statement
    By Panda2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2013, 12:50 PM
  3. Selecting a Range and performing a calculation
    By confusedvba in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2010, 06:26 PM
  4. Setting a range of numbers
    By estebanrey in forum Excel General
    Replies: 1
    Last Post: 06-30-2007, 10:01 AM
  5. [SOLVED] subtraction in a list of numbers that resets with a label.
    By gtslabs in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-27-2005, 10: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