Checking for merged cells

Is there a way in VBA to loop through a range, check if any of the cells are 
formatted as merged cells and if so, display a message?  Thanks.
0
Utf
4/20/2010 10:29:01 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
1108 Views

Similar Articles

[PageSpeed] 38

Hi,

Like this maybe

Sub MergedCells()
    Dim c As Range
    For Each c In ActiveSheet.UsedRange
        If c.MergeCells Then
            MsgBox c.Address & " is merged"
        End If
    Next
End Sub
-- 
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that 
introduces the fewest assumptions while still sufficiently answering the 
question.


"dhstein" wrote:

> Is there a way in VBA to loop through a range, check if any of the cells are 
> formatted as merged cells and if so, display a message?  Thanks.
0
Utf
4/20/2010 10:34:06 AM
Reply:

Similar Artilces:

Copying color formatting from cell to cell
On sheet A, I show work assignments by date and location. Dates are listed on the left column and jobs are listed along the top. I can assign Joe to "Job 101" on June 10, 2005 by putting his name under "Job 101" for June 10. If it is an all-day job, I put an * in front of Joe's name and it colors the cell yellow (using a conditional formatting rule). On sheet B, the dates are listed in the left hand column and then the employees are listed in columns next to the dates. I have used a look up formula to show "Job 101" under Joe's name for June 10, 2005. I ...

Large amount of cell text
Hi, We have a case where we have received records from a Hotmail subpoena. Microsoft has put the records in an Excel spreadsheet with all emails for a six month period being contained in a single column and tens of thousands of rows. The problem I am having is that some of the cells that contain the text from the email messages are very long, and makes reading of the cells difficult. An attempt to save to or publish to a different format for easier reading causes truncation of the text in those particular cells. Word Wrap, Autofit, nor simply double-clicking on the cell margin d...

Convert Cell Text to Matching Hyperlink?????
We have an Excel spreadsheet that contains information to scanned images being populated into our engineering database. In the spreadsheet there is information as to the creation time and date, size, title and other related information. One of the columns is the name and location of the actual TIFF image file. This field is just text. What we would like to do is convert the cell from just text stating the location and filename to a hyperlink pointing to the specific file. For example, the cell contents state : G: \folder2007\subfolder0320\00001234.tif We would like to still have the tex...

merge MSN Bill Pay & Checking Acct
I want to merge my checking account with MSN Bill Pay but only see that I can merge MSN Bill Pay with my checking account (i.e., you lose all of your checking account information). Does any one have any suggestions? -- cheers, Tom G ...

Linking Cells Between Sheets
This very straight forward function no longer works for me. When I enter "=" the cell reference cell changes to "ACOSH" as opposed to "VLOOKUP" on other computers. This will not eference cells on other worksheets within the same spreadsheet and even worse, changes seamingly random cell values in existing spreadsheets, often creating circular references. Nobody seems able to help and a the moment I am considering re-installing office! ACOSH is one of the Trigonometric Functions Simply typing an "=" sign in a cell should not invoke VLOOKUP or any ...

delete cells with "x" in them
I want to delete all cells in a range that have "x" in them. I have used the following code: For Each Cell In Sheets("CDPTS").Range("B1:B363") If Cell.Value = "x" Then Cell.Delete Shift:=xlUp End If Next Cell However, this doesn't delete them all? I repeated the code several times and it finally does get them all. Is there a more reliable code to do my job? SDC scrabtree, The reason it's not working every time is that If cell B1 contains an x, cell B2 contains an x and B3 contains "qwerty&...

Authorizing checks with RMS
I recently removed PCCharge and setup my syetm to work with a preferred merchant provider to allow native processing of credit & debit cards. Since check verification/authorization was handled by PCCharge to Telecheck, check authorization is now not being done. How is check authorization accomplished using a preferred provider? Thanks, Richard Unfortunately, it's not. PC Charge is the only option for check processing in RMS as far as I know. TPI or some other vendor may support it through an add-in, but RMS as shipped has no way of doing both checks and debit... -- -- Gle...

Check names not working for multiple address books / contacts
Hello! I have upgraded from outlook 2003 to outlook 2007, my contacts are stored in pst. I used to be able to search for a name via check names and it displayed me all the results from global address list and from my contacts, but now it only does one. It does not matter which one I set in the checking order, whichever is top will be the one that provides the result. I would like it to show me both results, how would I go about to set that up? Thank you Deana More accurate and complete information would be helpful. The Global Address List is only available to those who c...

How do I create Check list
1.I am new to excel and want to create a simple check list. I would like to have the first column check boxes and then the following columns discription and notes. Can someone give me a step by step on how to do this. I have created spread sheets but am not familiar with check boxes. 2.Also, Can someone tell me the difference between Access and Excel? Geek 1) Not sure what you're aiming to do with the checkboxes, but if you right click on the toolbar area, you will get a list of available toolbars. You want either the 'forms' toolbox or the 'controls' toolbox. Genera...

Check text field value against underlying table or query of combo box
Hello, I have a form on which the user can enter new records or update existing ones. If the user enters a new record on the form, I would like to have an 'After Update' event on one of the text fields, which is the item# to check if the value entered already exists in the underlying table, tbl_item. How can I call the table from the 'After Update' event of the text field and check for that value in the table? Thanks in advance. Regards, A. Crawford antcraw@swbell.net wrote: >I have a form on which the user can enter new records or update >existing ones. >If the us...

Preventing multiple check boxes from being checked
I have a worksheet with over 20 rows of check boxes with 5 check boxes in each row. (from the forms toolbox) I would like to prevent the user from checking more than one box in each row. Is this possible? BTW, this forum has been a great help. I'm so glad that expert Excel users are so willing to share their wealth of knowledge. Thanks again. Jae Put them in a group box, again from the forms toolbar. Drag the group box onto the sheet, then drag the checkboxes in. -- HTH RP (remove nothere from the email address if mailing direct) "Jae" <Jae@discussions.micro...

Printing Checks
I'm having a problem printing checks from Money 2003. I have three accounts that come up in one .mny file. Two of the accounts use 3-on-a-page checks and I want the name and address printed on them. One account uses voucher checks and needs to be nudged a little south. When I go to print checks I have to be aware of what account I'm in and change the settings by hand to make sure the checks print correctly. How can I make the check-print settings stick with the account I'm using. It's a pain to have to remember every time. I'm frequently forgetting and screwing up a pag...

Mail Merge Error on A2003
I am creating mail merge documents and opening them from VBA code using the code below. Set objWord = New Word.Application objWord.Visible = True objWord.Documents.Open Filename:=txtFolder & "\" & lstDocs With objWord.ActiveDocument.MailMerge If .State = wdMainAndDataSource Or .State = wdMainAndSourceAndHeader Then ... open merged document here, etc. This code works fine on A2000 but fails at the If statement on A2003. I believe this is due to extra security measures introduced by MS and is explained in this articl...

Mail merge and excel
I need to merge a list of names, adddresses, and phone numbers from an excel spreadsheet and print them on a directory booklet with color photos using Publishers 2003 . Could anybody point me to the right directionss. I will be great if someone could work me throught vis telephone. Caveboy wrote: > I need to merge a list of names, adddresses, and phone numbers from > an excel spreadsheet and print them on a directory booklet with color > photos using Publishers 2003 . Could anybody point me to the right > directionss. I will be great if someone could work me throught vis > t...

Cell Fill Color #2
I don't see how that link solves my problem... I am confused -- manicke ----------------------------------------------------------------------- manickel's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1534 View this thread: http://www.excelforum.com/showthread.php?threadid=26968 Hi sorry, misread your question. So you want to link the value and the format of the source cell. Short answer: Not possible. Formulas can only return values but not formats -- Regards Frank Kabel Frankfurt, Germany "manickel" <manickel.1e6om0@excelforum-nospam.com&...

Employee Check Format-Graphical
Does anyone know of a TK that shows how to convert one of the employee check from a text report to a graphical report? We do not have Direct deposit, I looked in the Report Downloads from Great Plains and did not see one there either. thanks -- Doug There's no secret here. Just un-check the "Text Report" option in the Report Definition window. And then modify the report so it looks like you want it. This will take some time. The reports don't transfer from text to graphical nicely. "Doug" wrote: > Does anyone know of a TK that shows how to convert...

Counting multiple values in a single cell
I have a cell which contains multiple values set out like this: 3; 4; 7 I would like to be able to count the number of values (3) in this cell. Does anybody know how I could do this???? -- ac8038 ------------------------------------------------------------------------ ac8038's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=6054 View this thread: http://www.excelforum.com/showthread.php?threadid=553526 You could use =SEARCH("3",A1) where A1 is the cell with the data. Be aware however tha it will also match 31, 33 (twice) etc. Matt -- Mallyca...

Check Names = "Exchange Server computer is busy..."
Here's what I got: Active Directory on Server 2003 1 Domain Controller also running DNS and WINS No other DNS or WINS servers (I know, I know) Static IP Addresses...NO DHCP Exchange Server 2003 on a member server Client running W2K SP4 Outlook 2000 SP3 Exchange has 4 mailboxes set, but nobody is using it. I'm still testing things out. When I try to connect to Exchange via my Outlook 2000, I get the following message: "The function cannot be performed because the Microsoft Exchange Server computer is busy. Try again later" I've tried it from 3 different client comp...

How to add a drop down menu to a cell
How to add a drop down menu to a cell? hi, you don't add it to a cell. It's a control in the toolbox and it sits on top of the sheet. Tools>customize>toolbar tab>select control toolbox. it's called a combo box. click it and drag it to the sheet. for more help on combo boxes, type combo box in help. >-----Original Message----- >How to add a drop down menu to a cell? >. > You can do it. Take a look at Data>Validation, see this site for full details http://www.contextures.com/xlDataVal01.html -- HTH RP (remove nothere from the email address if mailing d...

Which the maximum of characters of value in a cell?
When I impute a numerical sequence in a cell with more than 15 digits, excel does not conserve the typed value, modifying the digits from 16th typed. I ask: it is necessary to adjust some configuration in excel? Hi Excel's numerical limit is 15 digits. If you need to use more than 15, you'll have to enter it as text - either by formatting the cell as text before you type into it, or by starting the entry with a ' Hope this helps. Andy. "Malisky" <Malisky@discussions.microsoft.com> wrote in message news:B261F7DB-7A39-45D5-8FCE-F750D26D36EC@microsoft.com....

Printing MICR checks
Hello, We are having an issue printing checks on the Select Payables Checks window. When we try to print the checks we receive the error message below: "Warning: You have MICR but are not in a MICR screen. To use MICR, abort this screen and set up security access." The user has access to this screen but I'm not sure what this error message means. There was nothing related to this in the Knowledge Base either. Has anyone else received this error message before and if so how did/do you resolve it? Thanks! The user has the third party mekorma check writing module ...

Protecting cells #3
Excel 2000. I have a worksheet that has some columns I want protected and some others I want to be able to enter / edit . How do I set this up. (I don't want to protect ALL of the worksheet.) Thanks... rob Hi rob protection in excel works by first choosing the cells that you don't want protected (select cells; fomat / cells - protection tab; untick locked) and then protecting the worksheet (tools / protection / protect sheet). cheers julieD "rob p" <nospam*wlb@stans.net> wrote in message news:O1%235IZDZEHA.1356@TK2MSFTNGP09.phx.gbl... > Excel 2000. I have a wo...

Check off boxes
Publisher 2003 in use. I am creating a questionnaire that will be included in a newsletter. I am using the publisher software to make this form. Somewhere, in the past, I saw a keyboard shortcut to inset checkoff boxes, however, I cannot remember the key strokes. Any help along this line will be greatly appreciated. Thank you and enjoy your day. Mike Mike Reshetar wrote: > Somewhere, in the past, I saw a keyboard shortcut to inset checkoff boxes, > however, I cannot remember the key strokes. Use Wingdings and the � or q characters. -- Ed Bennett - MVP Microsoft Publisher h...

check check check
afpoiadshfpaosid It is a feature, not a bug -- Message posted from http://www.ExcelForum.com ...

Worksheet/Cell Protection
Is it possible to protect a single cell within a worksheet but still have the capability to hide rows and columns. I have protected a single cell but now I can not hide rows. Any comments would be helpful. Thanks --- Message posted from http://www.ExcelForum.com/ maac Cannot be done in versions earlier than Excel 2002 unless code is used. Gord Dibben Excel MVP On Tue, 16 Dec 2003 10:34:12 -0600, maacmaac <maacmaac.yjgga@excelforum-nospam.com> wrote: >Is it possible to protect a single cell within a worksheet but still >have the capability to hide rows and columns. I hav...