Excel/macro Formula Problem!

  • Thread starter Thread starter nic17
  • Start date Start date
N

nic17

Help!!

I have created a macro and i am trying to pull all the rows from m
data source where in one field 'incomp' the data does not equal blank
I know its simple, but i cannot figure it out!

I have tried <>" " and i have tried !=" " but neither work!

Can anyone help?
 
In your example you have put a space between the 2 quotation marks whe
they should have nothing between. i.e. an "empty string"
 
Thanks for your help,

I have tried both of these suggestions, but neither work! I've als
tried below:

<>""
<>" "
< >""
< >" "
!=""
!=" "

It's such a simple task, so why does this not work??:confused
 
Post the code that you are using. Code like the following should
work:

If Range("A1").Value <> "" Then
' A1 has something in it
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Below is the macro that I have set up:

Application.ScreenUpdating = False
Sheets("MTHDATA").Visible = True
Sheets("Criteria2").Visible = True
Sheets("Criteria2").Select

Range("datainput").AdvancedFilter Action:=xlFilterCopy
CriteriaRange _
:=Range("critrep1"), CopyToRange:=Range("report1")
Unique:=True

Sheets("Macro").Select
Range("C5").Select
Application.ScreenUpdating = True
End Sub

The criteria this is reading from is:

Report1 Incomp
< >"0"

It should then dump this into 'report 1'.

This has worked for all the other reports
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top