Results 1 to 4 of 4

Thread: can be used a single cell for a range of consecutive values?!

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0

    can be used a single cell for a range of consecutive values?!

    Hello everybody,

    I need to work with a big range of numbers... How can I input in a single cell a range of condecutive numbers, like from 1,50 to 10, with intervals of 0,01??? Then I would like to use this single cell in a complex formula, and extract the maximum value.

    What I am trying to do is to not have to write a long serie of cells, each one with values like 1,50; 1,51; 1,52... up to 10,00... So I need some way to put all this in a single cell.


    Thank you in advise!

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgxesLhWNr_zNP0GUdh4AaABAg. 9hI1CQJMLLo9hWn2pGBeSS
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgzkRujoMw9PblmXDQ14AaABAg. 9hJRnEjxQrd9hJoCjomNI2
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgzPZbG7OvUkh35nXDd4AaABAg. 9hJOZEEZa6p9hJqLC7El-w
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgwUcEpm8u6ZW3uOHXx4AaABAg. 9hIlxxGY7t49hJsB2PWxC4
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgyvDj6NWT1Gxyy2JyR4AaABAg. 9hIKlNPeqDn9hJskm92np6
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=Ugwy7qx_kG9iUmMVO_F4AaABAg. 9hI2IGUdmTW9hJuyaQawqx
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgxesLhWNr_zNP0GUdh4AaABAg. 9hI1CQJMLLo9hJwTB9Jlob
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgyyQWYVP1OnCqavb-x4AaABAg
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=UgwJKKmExZ1FdZVDJf54AaABAg
    https://www.youtube.com/watch?v=pkhazgI3LAo&lc=Ugz_p0kVGrLntPtYzCt4AaABAg
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg. 9h740K6COOA9iHOYYpaAbC
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgxuL6YCUckeUIh9hoh4AaABAg
    https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwGTEyefOX7msIh1wZ4AaABAg. 9h4sd6Vs4qE9h7G-bVm8_-
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 09-22-2023 at 05:00 PM.

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    You could enter these values one below the other in a single cell by pressing ALT+ENTER for each new line. You must remember that there is a limit to the number of characters that a cell can contain. For Excel 2003, it is 32,767. Not sure what's for the latter versions.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    13
    Quote Originally Posted by Pinos View Post
    Hello everybody,

    I need to work with a big range of numbers... How can I input in a single cell a range of condecutive numbers, like from 1,50 to 10, with intervals of 0,01??? Then I would like to use this single cell in a complex formula, and extract the maximum value.
    There may be a purely mathematical solution to obtain your maximum value, but in order to know if that is the case, we need to see your complex formula.

  4. #4
    Junior Member
    Join Date
    Jan 2012
    Posts
    10
    Rep Power
    0
    An ugly way of getting there.
    Cell A1 has the starting number
    Cell A2 has the end number
    Cell A3 has the increment
    Column B needs to be empty (free to use)
    Result in cell E2


    Code:
    Sub FillNumsBetween()
        Dim rRange As Range
        Dim rFill As Range
        Dim dStop As Double
        Dim rCell As Range
        Dim lr As Long
        Dim temparr
        Application.ScreenUpdating = False
        dStop = Cells(2, 1)   '<----- End Value
        Set rFill = Cells(1, Columns.Count).End(xlToLeft)(1, 2)    '<---- Where it starts filling results
        Cells(1, 1).Copy rFill
        Range(rFill, Cells(Rows.Count, rFill.Column)).DataSeries _
                Rowcol:=xlColumns, Type:=xlLinear, _
                Step:=Range("A3").Value, Stop:=dStop
        lr = Cells(Rows.Count, 2).End(xlUp).Row
        temparr = Range("B1:B" & lr)
        Cells(2, 5) = Join(WorksheetFunction.Transpose(temparr), "; ")
        Application.ScreenUpdating = True
    End Sub
    I hope someone cleans this code up. For now it should help you.

Similar Threads

  1. How Get Value From A Cell Range Using VBA
    By ajgcook1983 in forum Excel Help
    Replies: 5
    Last Post: 09-17-2013, 09:28 AM
  2. Replies: 1
    Last Post: 08-23-2013, 05:19 AM
  3. counting consecutive values in an array
    By 5ko in forum Excel Help
    Replies: 3
    Last Post: 12-04-2012, 03:49 AM
  4. Count consecutive value in a range using formula
    By LalitPandey87 in forum Excel Help
    Replies: 6
    Last Post: 11-12-2012, 05:23 PM
  5. Concatenate Multiple Lookup Values in Single Cell
    By Admin in forum Download Center
    Replies: 4
    Last Post: 04-06-2012, 09:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •