Results 1 to 3 of 3

VBA - Excel 2013 - WorksheetFunction.CountBlank

Threaded View

dude6571 VBA - Excel 2013 -... 03-27-2017, 05:37 PM
FDibbins Re: VBA - Excel 2013 03-28-2017, 01:40 AM
dude6571 Re: VBA - Excel 2013 03-29-2017, 05:33 PM
  1. #1
    Registered User
    Join Date
    01-11-2013
    Location
    London
    MS-Off Ver
    Excel 2013, 2016
    Posts
    95

    VBA - Excel 2013 - WorksheetFunction.CountBlank

    Sub test()
    
    Dim cnt As Long
            
       iF cnt = WorksheetFunction.CountBlank(Range("A1", Range("A" & Rows.Count).End(xlUp))) > O THEN
        
        MsgBox "Location is blank for " & vbCrLf & cnt & " devices.", vbExclamation, "Action Required"
        
        Range("A1:B" & LRow).AutoFilter Field:=1, Criteria1:="="
    
    End If
    
    'Insert Column to the left of Column A
    
         Columns("A:A").Insert Shift:=xlToRight, _
        CopyOrigin:=xlFormatFromLeftOrAbove 'or xlFormatFromRightOrBelow
        Range("A1") = "CV_Location"
    
    
    
    End Sub

    ----------------------------
    | Column A | Column B |
    --------------------------- |
    | CV | TCMAD06 |
    | CV1 | PC7OPSL31 |
    | | PC7MESS240 |
    | CV3 | PC7MEOS13 |
    ----------------------------

    Message box shows correctly "Location is blank for 1 device(s)" (Cell A3 is empty)

    Now, I would like to a create a formula which autofilter blank cell and then as soon as empty cells are filled up with correct informations , it should by pass the msgbox to carry on the rest of my script but I can't seem to make work with formula
    Last edited by dude6571; 04-03-2017 at 03:29 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-21-2016, 05:24 PM
  2. Connecting Excel 2013/16 to Access 2013/16 (SELECT, INSERT, and UPDATE)
    By mrb783 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-31-2016, 03:04 PM
  3. instal stand alone EXCEL 2013 on OFFICE 2013 home and business
    By LukasLyziciar in forum Excel General
    Replies: 0
    Last Post: 06-19-2015, 03:41 AM
  4. Excel 2013 and Access 2013 as Pivot Table External Data Source
    By Grimnebulin in forum Access Tables & Databases
    Replies: 1
    Last Post: 05-27-2015, 02:13 PM
  5. Replies: 1
    Last Post: 12-27-2014, 11:20 PM
  6. No PowerPivot in Com Add ins Excel 2013 (Microsoft office professional plus 2013)
    By benoj2005 in forum PowerPoint Formatting & General
    Replies: 7
    Last Post: 09-18-2014, 09:13 AM
  7. Replies: 3
    Last Post: 07-20-2014, 11:46 AM

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