Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

wild card - cash deposit

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
transferxxx - 10 Nov 2007 00:06 GMT
Sub insert()
Dim r As Range
Dim rd As Range
Set r = Range("H2")
Do While Not IsEmpty(r)
   Set rd = r.Offset(1, 0)
   If r.Offset(0, -1) = "Cash Deposits*" Then
   r.insert Shift:=xlToRight
   End If
   Set r = rd
Loop
End Sub

Above macro is not working on e.gCells containing Cash Deposits Euro100 or
Cash Deposits USD 1000
Can someone pls correct my macro thxs
JLGWhiz - 10 Nov 2007 00:19 GMT
You might have to use the Like operator.

If r.Offset(0, -1) Like "Cash Deposits*" Then

> Sub insert()
> Dim r As Range
[quoted text clipped - 12 lines]
> Cash Deposits USD 1000
> Can someone pls correct my macro thxs
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.