Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Continuous Range


Hello,

OK here is what I am trying to do. I would like to have the macr
output to a different cell each time an entry is entered into an inpu
box. My macro has been designed to log the employee's name, clock i
time, clock out time, and export that information to a specific cel
range. I have all of the macro code in a loop, however, when it start
a second time how would I make it so that is pastes to the cells belo
what is previously pasted information in? Any help on this proble
would be appreciated.

Thanks,

Dav

--
DSC17
-----------------------------------------------------------------------
DSC174's Profile: http://www.excelforum.com/member.php...fo&userid=2755
View this thread: http://www.excelforum.com/showthread.php?threadid=47474

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Continuous Range

to find the next open cell in a column of data you can use something along
the lines of

set rng = Cells(rows.count,1).End(xlup).offset(1,0)

In this case, the 1 indicates column 1 (column A), but can be altered.

If you have a specific range you can use

set rng = Range("B9:B30").SpecialCells(xlBlanks)
set cell = rng(1)

and cell is now a reference to the first blank cell.

Other than that, you would have to be more specific

--
Regards,
Tom Ogilvy


"DSC174" wrote in
message ...

Hello,

OK here is what I am trying to do. I would like to have the macro
output to a different cell each time an entry is entered into an input
box. My macro has been designed to log the employee's name, clock in
time, clock out time, and export that information to a specific cell
range. I have all of the macro code in a loop, however, when it starts
a second time how would I make it so that is pastes to the cells below
what is previously pasted information in? Any help on this problem
would be appreciated.

Thanks,

Dave


--
DSC174
------------------------------------------------------------------------
DSC174's Profile:

http://www.excelforum.com/member.php...o&userid=27553
View this thread: http://www.excelforum.com/showthread...hreadid=474745



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Continuous Range


dave-

count = Application.WorksheetFunction.count(Range(Cells(9, 15)
Cells(18, 15)))
Cells(9 + count, 15) = "insert your 'output' data"

you didnt add any specifics so my answer is a little vague, sorry.
when using the "cells" identifier... cells(row, column).

typically, (and this is just me) i code these lines slightl
differently. when you use "range" or "cells" it is public and works o
any worksheet, whichever one is active. if you want it to only work o
a specific worksheet you might want to do this...

a = worksheets("sheet1")

...after doing so you can do this...

a.range(a.cells(9,15), a.cells(18,15))
a.cells(9 + count, 15) = "insert your 'output' data"

...this only works on worksheet("sheet1") now so you can have an
worksheet active.

hope this helps, and isnt too confusing.
-ta

--
tad_wegne
-----------------------------------------------------------------------
tad_wegner's Profile: http://www.excelforum.com/member.php...fo&userid=2777
View this thread: http://www.excelforum.com/showthread.php?threadid=47474

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Continuous Range

Just to add that count counts only cells with numbers. countA might be
better.

Also Tad probably meant

set a = worksheets("Sheet1")

--
regards,
Tom Ogilvy

"tad_wegner" wrote
in message ...

dave-

count = Application.WorksheetFunction.count(Range(Cells(9, 15),
Cells(18, 15)))
Cells(9 + count, 15) = "insert your 'output' data"

you didnt add any specifics so my answer is a little vague, sorry.
when using the "cells" identifier... cells(row, column).

typically, (and this is just me) i code these lines slightly
differently. when you use "range" or "cells" it is public and works on
any worksheet, whichever one is active. if you want it to only work on
a specific worksheet you might want to do this...

a = worksheets("sheet1")

..after doing so you can do this...

a.range(a.cells(9,15), a.cells(18,15))
a.cells(9 + count, 15) = "insert your 'output' data"

..this only works on worksheet("sheet1") now so you can have any
worksheet active.

hope this helps, and isnt too confusing.
-tad


--
tad_wegner
------------------------------------------------------------------------
tad_wegner's Profile:

http://www.excelforum.com/member.php...o&userid=27770
View this thread: http://www.excelforum.com/showthread...hreadid=474745



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
Summing a non continuous range fabio Excel Worksheet Functions 7 June 2nd 10 04:23 PM
COUNTIF with non-continuous range Ken Excel Discussion (Misc queries) 2 April 6th 09 10:33 PM
maximum over a non continuous range david Excel Worksheet Functions 6 October 2nd 07 04:14 PM
SUMIF Non-Continuous Range Kirk P. Excel Worksheet Functions 2 October 13th 06 09:46 PM
Sum function for non-continuous range Antje Excel Worksheet Functions 3 July 14th 05 01:13 PM


All times are GMT +1. The time now is 03:54 PM.

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"