Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If statement checking list B Rucks Excel Worksheet Functions 4 January 19th 12 08:14 PM
Checking whether a value in a list is present in a second list [email protected] Excel Discussion (Misc queries) 5 June 1st 07 02:30 PM
checking for a value in a list kcrad Excel Discussion (Misc queries) 3 March 13th 07 04:20 PM
Checking if value is in a list roeaster Excel Worksheet Functions 1 April 15th 05 05:00 PM
Checking the last character is in a list [email protected] Excel Programming 2 August 18th 03 11:37 AM


All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"