+ Reply to Thread
Results 1 to 13 of 13

Count Border by Cell Reference

  1. #1
    Registered User
    Join Date
    08-18-2019
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    28

    Count Border by Cell Reference

    Gday everyone,

    Im after help with a VBA code that will allow me to count a table that has a specific border type and give me a count. It would be great if i could have the code use a specific cell as a reference to what kind of border it needs to count so if i need to change the border, i dont have to adjust the code.

    Any help would be muchly appreciated

    Shonky

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Count Border by Cell Reference

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and click Manager Attachmentto open the upload window.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Count Border by Cell Reference

    Try something like this.
    Select the range before you run the code.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-18-2019
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    28

    Re: Count Border by Cell Reference

    I like this, although I do need it to count a from certain tables and to only count if all 4 sides are bordered.
    They are a bold dash border and there are other borders around so it has to only count specific border types.Attachment 637777

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Count Border by Cell Reference

    When I try to open your attachment, it says
    Invalid Attachment specified. If you followed a valid link, please notify the administrator

  6. #6
    Registered User
    Join Date
    08-18-2019
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    28

    Re: Count Border by Cell Reference

    Lets see if this works
    Attached Images Attached Images

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Count Border by Cell Reference

    See if this works
    Please Login or Register  to view this content.
    Edit:
    I just see a merged cell at the bottom of the screen...
    Last edited by jindon; 08-19-2019 at 02:23 AM.

  8. #8
    Registered User
    Join Date
    08-18-2019
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    28

    Re: Count Border by Cell Reference

    I can unmerge it, it was purely cosmetic

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Count Border by Cell Reference

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  10. #10
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Count Border by Cell Reference

    With no merged cells, does this function do what you want...
    Please Login or Register  to view this content.

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Count Border by Cell Reference

    Is it not working?

    If not, I need to see your workbook.

  12. #12
    Registered User
    Join Date
    08-18-2019
    Location
    Australia
    MS-Off Ver
    MS Office 365
    Posts
    28

    Re: Count Border by Cell Reference

    This code is working great, exactly what I was after. Now i have 543 cells to reformat because I clearly made a mistake in its initial formating :-P thank you very much!

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Count Border by Cell Reference

    You are welcome.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 03-22-2018, 02:11 AM
  2. [SOLVED] Function to Get Array Count from Cell Reference and Repeat
    By desertshore in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2015, 01:49 PM
  3. Replies: 2
    Last Post: 09-21-2013, 07:24 PM
  4. [SOLVED] Count number of cells with thick border?
    By jeffep in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2012, 09:21 AM
  5. [SOLVED] Changing the border of one cell s/n change the border of adjacent
    By gjanssenmn in forum Excel General
    Replies: 2
    Last Post: 10-05-2005, 04:05 PM
  6. Replies: 1
    Last Post: 08-17-2005, 02:05 PM
  7. Replies: 0
    Last Post: 01-12-2005, 10:50 AM

Tags for this Thread

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