![]() |
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! |
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! |
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. |
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! |
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! |
All times are GMT +1. The time now is 12:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com