Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gap Gap is offline
external usenet poster
 
Posts: 15
Default Merged Cells Value

Hello,

If A1:C1 are merged cells, why is the value of B1 & C2 null and only A1
has the value?

How to get the value set in the merged cells if I have a reference to
say B1 or C1 here?

Tks & Regds
Gap

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Merged Cells Value

When dealing with merged cells (I avoid them at all costs; too
much trouble with cut/paste, sorting, etc), you reference the top
left cell in the merge area, and ignore the other cells.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Gap" wrote in message
oups.com...
Hello,

If A1:C1 are merged cells, why is the value of B1 & C2 null and
only A1
has the value?

How to get the value set in the merged cells if I have a
reference to
say B1 or C1 here?

Tks & Regds
Gap



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Merged Cells Value

Because only A1 holds the value. But you can use:

set rng= Range("B1")
msgbox rng.mergearea(1).Value

--
Regards,
Tom Ogilvy




"Gap" wrote in message
oups.com...
Hello,

If A1:C1 are merged cells, why is the value of B1 & C2 null and only A1
has the value?

How to get the value set in the merged cells if I have a reference to
say B1 or C1 here?

Tks & Regds
Gap



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Merged Cells Value

Tru:
MsgBox Range("B1").MergeArea(1, 1).Value

Regards,
Greg

"Gap" wrote:

Hello,

If A1:C1 are merged cells, why is the value of B1 & C2 null and only A1
has the value?

How to get the value set in the merged cells if I have a reference to
say B1 or C1 here?

Tks & Regds
Gap


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
Copy paste non merged to merged cells [email protected] Excel Worksheet Functions 1 February 5th 09 05:25 PM
How can I sort an Excel Doc containing merged & non-merged cells? KellyH Excel Discussion (Misc queries) 11 June 10th 08 04:12 AM
Autofit Merged cell Code is changing the format of my merged cells JB Excel Discussion (Misc queries) 0 August 20th 07 02:12 PM
how do i link merged cells to a merged cell in another worksheet. ibbm Excel Worksheet Functions 3 April 27th 06 11:40 PM
Sorting merged cellsHow do I sort merged cells not identically siz Laval Excel Worksheet Functions 1 November 3rd 04 09:40 PM


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