Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
GUS GUS is offline
external usenet poster
 
Posts: 45
Default next avaliable range

I want to export some values from one sheet to another , but i want to put
them exactly in specified ranges .
For that , i have predefine 8 ranges at sheet 2
range1, (from celll a1 to a14)
range2,(from cell b1 to b14)
range3 (from cell a15 to a30)
range 4 (from cell b15 to b30)
range 5 (from cell a31 to a45)
etc.

I want to find which range is empty in order to put in it the values from
sheet1.

(the macro which takes the values from sheet1 and paste it to sheet2 is
ready except the above part )


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default next avaliable range

GUS,

Sub Macro1()
Dim i As Integer
For i = 1 To 2
If IsEmpty(Worksheets("Sheet2").Range("range" & i).Cells(1, 1).Value)
Then
MsgBox "range" & i & " is empty, so I'll paste it there."
'Do your paste using Worksheets("Sheet2").Range("range" & i)
Exit Sub
End If
Next i
End Sub

HTH,
Bernie
MS Excel MVP

"GUS" wrote in message
...
I want to export some values from one sheet to another , but i want

to put
them exactly in specified ranges .
For that , i have predefine 8 ranges at sheet 2
range1, (from celll a1 to a14)
range2,(from cell b1 to b14)
range3 (from cell a15 to a30)
range 4 (from cell b15 to b30)
range 5 (from cell a31 to a45)
etc.

I want to find which range is empty in order to put in it the values

from
sheet1.

(the macro which takes the values from sheet1 and paste it to sheet2

is
ready except the above part )




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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
option not avaliable Raphael Excel Discussion (Misc queries) 1 July 6th 09 02:11 PM
Insert Tab not avaliable DawnP277 Excel Discussion (Misc queries) 3 October 3rd 08 02:13 AM
How to expand coloms beond the last avaliable one in a Worksheet KJELDK Excel Discussion (Misc queries) 8 February 1st 07 08:20 AM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM


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