×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Read Each Cell in Excel File

Read Each Cell in Excel File

Read Each Cell in Excel File

(OP)
Hi, does anyone know how to loop each cell in a given range in Excel through Attachmate macro? Thank you.

RE: Read Each Cell in Excel File

hi,

What code do you have so far?

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Read Each Cell in Excel File

(OP)
Oh, thanks 4 replying Skip. Never mind. I already have a solution for this. Thank you.

RE: Read Each Cell in Excel File

It is both customary and proper etiquette to share you solution with other members who may be browsing your thread.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Read Each Cell in Excel File

(OP)
Ok Skip, here is the code for me to browse all the cell and then get the data that I want. I have referred to one of the post in this Attachmate forum to get this solution.

CODE --> (VBA)

Sub rExtract()

    Dim rNCell, rNCol, rNRng As Range
    
    Set rNRng = Sheets("RCreation Template").Rows("1:500")
    Set rNCol = Sheets("RCreation Template").Columns("A:HH")
    Sheets.Add.Name = "rName"
    
    For Each rNCol In rNRng.Rows
        For Each rNCell In rNCol.Columns
        
            If rNCell.Value = "Operation" Then
                rNCell.Offset(-2, 0).Copy
                
                Sheets("rName").Select
                If IsEmpty(ActiveCell) Then
                    Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
                        :=False, Transpose:=False
                Else
                    Range("A65536").End(xlUp).Offset(1, 0).Select
                    ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
                        :=False, Transpose:=False
                End If
            End If
        Next rNCell
    Next rNCol
End Sub 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close