+ Reply to Thread
Results 1 to 2 of 2

Using logic function (or other) to determine if cell is merged

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Heerlen, Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    5

    Using logic function (or other) to determine if cell is merged

    Hello all,

    I found the 'Sub ReadDataFromAllWorkbooksInFolder()' with the function 'GetInfoFromClosedFile'
    I am trying to get data from several sheets (files) from multiple cells (all the same address)
    However some of those are merged cells, which makes the 'ReadData...' not working.

    How/where can/should I use the mentioned UDF in this thread?

    I'd be grateful for suggestions
    Last edited by jeffreybrown; 11-23-2012 at 11:22 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Using logic function (or other) to determine if cell is merged

    First, the UDF in that thread is intended to be used in a formula in a worksheet. It is not useful to use within VBA code because all it does is refer to Range.MergeCells. You can do that just as easily in the code. That is:
    Please Login or Register  to view this content.
    But to tell you specifically what to do I would have to see the code you have. The only thing I can imagine that is giving you a problem is: Suppose you have A1 and B1 merged, and you see data in the merged cell. Data in a merged range is located in the upper-left cell of the range. If you write code to read B1, it will give you a blank because the data is in A1, not B1.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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