vba courses london - looping macro find chunks
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - Looping macro to find chunks of data

vba courses london - Looping macro to find chunks of data

The UK's most regular instructor-led training courses.
Training information: vba courses london · Excel london

resolvedResolved · Low Priority · Version Standard

Looping macro to find chunks of data

Robert has attended:
Excel VBA course
Excel VBA course

by - delegate Robert [1 post] (2007 May 18 Fri, 15:03) replyReply

I have a selection of reports which place one large chunk of data I need to select in random places.
I thought maybe a loop with the offset command to find it would work but cant think of how to write this.

any ideas?

RE: Looping macro to find chunks of data

by - trainer Garry gold contributer[188 posts] (2007 May 18 Fri, 16:06) replyReply

Private Sub CommandButton1_Click()
Dim Cell As Range, SelectedRange As Range, X As String
X = InputBox("enter Name")

Set SelectedRange = Range("A1").CurrentRegion
For Each Cell In SelectedRange
If Cell = X Then
Cell.Font.ColorIndex = 3
End If
Next Cell

End Sub


Related articles

· Company Roles in Visual Basic Training
· What Is Microsoft Excel VBA and How Can It Help You Work Smarter?

Vba tip:

Use GoTo to Select A Cell With VBA

To select a certain cell on a Worksheet you can use:

Application.Goto Reference:=Range("V300")

or more simply

Range("V300").Select

If, on the other hand, you want the selected cell to be the top/left cell on the screen you use:

Application.Goto Reference:=Range("V300"), Scroll=True

View all VBA hints and tips

Institute of IT Training - Accredited Training Provider Institute of IT Training - Accredited Training Provider Prodigy Platinum Learning Partner Microsoft Office Specialist Authorised Testing Centre

Microsoft Registered Partner
microsoft office
ms office project server

Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz