+ Reply to Thread
Results 1 to 3 of 3

Reference Merged Cell Value

  1. #1
    Registered User
    Join Date
    04-17-2009
    Location
    St. Catharines, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    13

    Post Reference Merged Cell Value

    Hello All,

    The issue that I am having is with merged cell data. What I am trying to do is check the value of the merged cell against a selection from an array and place the value into a cell.

    What apparently occurs is that if the row that I am on is an even number (being as my rows start on an odd number); the reference returns empty. I have tested to confirm that this only affects even numbered rows.

    My spread sheet has a 2 row merged cell in column 2, and the cell I am referencing from is on the second row of that merged cell.

    Here is some code:

    Please Login or Register  to view this content.
    So the issue only occurs when "r" is the second row used in the merged cell

    Anyone see how I can still be able to reference the value contained in the merged cell? I would also like to note, that testing has proven that when "r" is the first row used in the merged cell, there is no issue with referencing it's value
    Last edited by AErmie; 05-11-2009 at 07:00 PM. Reason: Solution Discovered

  2. #2
    Registered User
    Join Date
    01-06-2009
    Location
    Tamworth, Australia
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Reference Merged Cell Value

    I ran into a similar problem. As far as I could work out when cells are merged excel only looks at the uppermost left cell.

    So for example if you merge A1 & B1 any formula reference will only look at A1.

    If it helps I never merge cells unless there is no other option, from what i can tell people only do merge for the sake of formatting, you can format the same way by centreing across selection.

    Good luck

  3. #3
    Registered User
    Join Date
    04-17-2009
    Location
    St. Catharines, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    13

    Post Re: Reference Merged Cell Value

    Thanks for the input, however I was able to resolve this issue.

    What worked for me, was to just add another ElseIf statement forcing it to check the row - 1.

    Please Login or Register  to view this content.
    Hope this helps someone.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1