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


Hello,

I'm having 4 sheets in a XLS named sheet1,2,3 and total.

I have 3 emploies and each one will complete an individual sheet, for
example emploie john will make a list with all of his clients in
sheet1, mark in sheet2,by columns etc.

I've built a macro that takes the informations from the first 3 sheets
and centralize it in the "total" sheet.

However, the number of clients that each individual emploie has isn`t
the same each month. So i want my program to take info from sheet1,
put it nicely in total, *then automaticaly detect the empty row* and
take the info from sheet2 and put it right from there, and so on for
sheet3.

If anyone could help me i would be grateful, please note that my
experience with VBA is limited and i could use some explicit hints.

Thanks and sorry for my bad english.


--
Diez
------------------------------------------------------------------------
Diez's Profile: http://www.excelforum.com/member.php...o&userid=35614
View this thread: http://www.excelforum.com/showthread...hreadid=553914

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Checking empty cells

Hi Diez,

Youo can determine the first empty cell in column A of the Total sheet thus:

Dim destRng As rng

Set destRng = Sheets("Total").Cells(Rows.Count, "A").End(xlUp)(2)


Therefore, you could perform the copy operations something like:

Set destRng = Sheets("Total").Cells(Rows.Count, "A").End(xlUp)(2)
Sheets("John").Range("A2:D50").Copy Destination:= destRng
Set destRng = Sheets("Total").Cells(Rows.Count, "A").End(xlUp)(2)
Sheets("Mark").Range("A2:D100").Copy Destination:= destRng
Set destRng = Sheets("Total").Cells(Rows.Count, "A").End(xlUp)(2)
Sheets("Fred").Range("A2:D75").Copy Destination:= destRng



---
Regards,
Norman


"Diez" wrote in message
...

Hello,

I'm having 4 sheets in a XLS named sheet1,2,3 and total.

I have 3 emploies and each one will complete an individual sheet, for
example emploie john will make a list with all of his clients in
sheet1, mark in sheet2,by columns etc.

I've built a macro that takes the informations from the first 3 sheets
and centralize it in the "total" sheet.

However, the number of clients that each individual emploie has isn`t
the same each month. So i want my program to take info from sheet1,
put it nicely in total, *then automaticaly detect the empty row* and
take the info from sheet2 and put it right from there, and so on for
sheet3.

If anyone could help me i would be grateful, please note that my
experience with VBA is limited and i could use some explicit hints.

Thanks and sorry for my bad english.


--
Diez
------------------------------------------------------------------------
Diez's Profile:
http://www.excelforum.com/member.php...o&userid=35614
View this thread: http://www.excelforum.com/showthread...hreadid=553914



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
Checking for Empty Scattered Cells Kevin O'Neill[_2_] Excel Programming 2 January 4th 06 06:41 PM
Checking for empty cells in a range Chris Strug Excel Programming 8 June 21st 05 12:07 AM
Checking for empty cells in a range Chris Strug Excel Programming 3 June 20th 05 03:11 PM
Checking for empty cells in a range Chris Strug Excel Worksheet Functions 2 June 20th 05 10:33 AM
Checking if an Excel file is empty? Kintan Excel Programming 0 November 11th 04 03:24 AM


All times are GMT +1. The time now is 07:16 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"