VBA Help - how to find Blank cells specified columns

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
976
Office Version
  1. 2010
Platform
  1. Windows
Hi Team,

how to find blank cells for columns(1,3,5,6,9,10,14,16) faster way.

Last row of the above columns is 10000 records. header at at first row.



Thanks
mg
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
The question is somewhat ambiguous. What do you want to do if you find blank cells in those column?
 
Upvote 0
Hi JLGWhiz

Actually all above columns are Amount columns. and in that columns I don't want any blank cells.

Macro to check before proceeding further. if found exit the sub.



Thanks
mg
 
Upvote 0
Maybe something like this

VBA Code:
Sub t()
Dim rng As Range
Set rng = Union(Columns(1), Columns(3), Columns(5), Columns(6), Columns(9), Columns(10), Columns(14), Columns(16))
Application.DisplayAlerts = False
On Error GoTo Skip:
    If Intersect(ActiveSheet.UsedRange, rng).SpecialCells(xlCellTypeBlanks).Count > 0 Then
        Beep
       MsgBox "Blanks"
    End If
Skip:
Err.Clear
Application.DisplayAlerts = True
End Sub
 
Upvote 0
HI JLZWhiz,

Really awsome, thanks a lot it worked. ? (y)

Need one more help if you can .

I want to check "-" charecter in above columns. sometimes user put by mistakes in Amounts Columns.

if Found macro should exit with message.




Thanks
mg
 
Upvote 0
According to forum guidelines, additional requests not meeting the original issue criteria should be made by starting a new thread.
 
Upvote 0
Hi JLGWhiz,

Millions of Thanks for your help, I will put extra thread for it. (y)



Thanks
mg
 
Upvote 0

Forum statistics

Threads
1,215,056
Messages
6,122,907
Members
449,096
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top