troubleshooting Question

Cell tha that are empty

Avatar of drezner7
drezner7 asked on
VB Script
12 Comments1 Solution456 ViewsLast Modified:
What I would like to do is if a cell in excel is empty I would like to code to skip and move to the next one.. here is my code so far:
iRow = 2
Do While  oSheet.Cells(iRow, 1).Value <> ""
    colA = oSheet.Cells(iRow, 1).Value
    colB = oSheet.Cells(iRow, 2).Value
    colC = oSheet.Cells(iRow, 3).Value

But when I add this to it Do While  Not IsEmpty (oSheet.Cells(iRow, 1).Value) <> "" ... It stops working. I want it to read the cell and if it is empty just skip it and move on to the next one.
I am reading the rows like this: and the output is in XML format

If UCase(Left(colA,2))= "XA" Then
        oOut.WriteLine("  <XA_data>")
        oOut.WriteLine("  <EIACODXA>" & colB & "</EIACODXA>")

Thank you
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros