+ Reply to Thread
Results 1 to 5 of 5

Making a List (and checking it later)

  1. #1
    Donny
    Guest

    Making a List (and checking it later)

    I'm trying to make a list. Say I hit a button and it generates a
    random number in cell C1. I want to make another button that copies
    that number and pastes it at the bottom of a list in column F. I can
    count the number of values in column F, but I don't know how to make a
    reference to the cell below the last number counted. Does anyone know
    how to do this easily, possibly with little VBA code? After I make the
    list, I will be able to search it for max, min, and things like that.
    Thanks!


  2. #2
    Die_Another_Day
    Guest

    Re: Making a List (and checking it later)

    Sub MoveC1Value()
    Range("F1").End(xlDown).Offset(1,0) = Range("C1")
    End Sub

    Explanation:
    Range("F1") = Look at Cell "F1"
    End(xlDown) = Press Ctrl + DownArrow
    Offset(1,0) = Cell 1 row down and zero columns over from the last value
    in Column F

    Charles

    Donny wrote:
    > I'm trying to make a list. Say I hit a button and it generates a
    > random number in cell C1. I want to make another button that copies
    > that number and pastes it at the bottom of a list in column F. I can
    > count the number of values in column F, but I don't know how to make a
    > reference to the cell below the last number counted. Does anyone know
    > how to do this easily, possibly with little VBA code? After I make the
    > list, I will be able to search it for max, min, and things like that.
    > Thanks!



  3. #3
    Donny
    Guest

    Re: Making a List (and checking it later)


    it didn't work

    anyone know how to do this?

    i want to be able to do this over and over again. i think it had
    trouble selecting the cell below the last one in the list.


  4. #4
    Donny
    Guest

    Re: Making a List (and checking it later)


    Scratch that...

    it did work... it just needed 2 things in the list before it would work
    right. sorry if anyone was reworking it. THANKS!


  5. #5
    Die_Another_Day
    Guest

    Re: Making a List (and checking it later)

    Sry I should've accounted for that.
    If Range("F1") = "" Then
    Range("F1") = Range("C1")
    Else
    Range("F" & Rows.Count).End(xlUp).Offset(1,0) = Range("C1")
    End If

    Charles

    Donny wrote:
    > Scratch that...
    >
    > it did work... it just needed 2 things in the list before it would work
    > right. sorry if anyone was reworking it. THANKS!



+ 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