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

Hi All

Im trying to make the example 1 work from Copy3, but Im having trouble
referring to multiple named ranges - most I can get to work is one named
range (always only 1 [merged] cell). Whats the correct method?
- Set sourceRange = .Range("")

Also, is there a way to get the names of the ranges into row 1?

Thanks a heap
Andrew
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Rond merge help

To get range names into row 1, try:

Sub NameLister()
Dim n As Name
i = 0
For Each n In ThisWorkbook.Names
Range("A1").Offset(0, i).Value = n.Name
i = i + 1
Next
End Sub

--
Gary''s Student - gsnu200901


"Andrew P." wrote:

Hi All

Im trying to make the example 1 work from Copy3, but Im having trouble
referring to multiple named ranges - most I can get to work is one named
range (always only 1 [merged] cell). Whats the correct method?
- Set sourceRange = .Range("")

Also, is there a way to get the names of the ranges into row 1?

Thanks a heap
Andrew

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Ron merge help

Hi Gary

Sorry, I dont follow it - is this meant to sit in the merge macro? FYI the
code Im using is from http://www.rondebruin.nl/copy3.htm

Thanks
Andrew

"Gary''s Student" wrote:

To get range names into row 1, try:

Sub NameLister()
Dim n As Name
i = 0
For Each n In ThisWorkbook.Names
Range("A1").Offset(0, i).Value = n.Name
i = i + 1
Next
End Sub

--
Gary''s Student - gsnu200901


"Andrew P." wrote:

Hi All

Im trying to make the example 1 work from Copy3, but Im having trouble
referring to multiple named ranges - most I can get to work is one named
range (always only 1 [merged] cell). Whats the correct method?
- Set sourceRange = .Range("")

Also, is there a way to get the names of the ranges into row 1?

Thanks a heap
Andrew

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
Mail merge macro: select recipients from Excel during merge Worksmart Excel Programming 0 May 18th 08 06:37 PM
mail merge excludes my headers and critical data in Word merge Nix Excel Discussion (Misc queries) 0 April 21st 06 08:35 PM
Roud up or rond down jwfakouri Excel Discussion (Misc queries) 4 March 11th 06 01:11 AM
Merge =( formula should retain fraction type numbers after merge. Aubrey Excel Worksheet Functions 0 February 9th 06 07:37 PM
how do i get my mail merge to update the data source at each merge Steel_Monkey Excel Discussion (Misc queries) 0 November 30th 05 08:41 AM


All times are GMT +1. The time now is 08:47 PM.

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

About Us

"It's about Microsoft Excel"