ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding Cells After they've Been Found (https://www.excelbanter.com/excel-programming/310438-adding-cells-after-theyve-been-found.html)

alexm999[_95_]

Adding Cells After they've Been Found
 

I have the following code:

Windows("Alex").Activate
Columns("A:A").Select
Set oFound = Columns(1).Find(WHAT:="EXT", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=True)
If Not oFound Is Nothing Then
oFound.Activate
If Trim(oFound) = "EXT" Then
ActiveCell.Offset(rowOffset:=0, columnOffset:=3).Activate
Selection.Copy
Windows("BOOK1.XLS").Activate
Range("E3").Select
ActiveSheet.Paste
Application.Goto oFound
End If
End If

How can i get it to Add the contents of this cell to another cell usin
VB?
Any example

--
alexm99
-----------------------------------------------------------------------
alexm999's Profile: http://www.excelforum.com/member.php...nfo&userid=491
View this thread: http://www.excelforum.com/showthread.php?threadid=26134


Tom Ogilvy

Adding Cells After they've Been Found
 
Windows("Alex").Activate
Columns("A:A").Select
Set oFound = Columns(1).Find(WHAT:="EXT", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=True)
If Not oFound Is Nothing Then
oFound.Activate
If Trim(oFound) = "EXT" Then
ActiveCell.Offset(rowOffset:=0, columnOffset:=3).Activate
Selection.Copy
Windows("BOOK1.XLS").Activate
Range("E3").Select
ActiveSheet.Pastespecial xlValues, xlPasteSpecialOperationAdd
Application.Goto oFound
End If
End If

Would be one guess at what you want.
--
Regards,
Tom Ogilvy


"alexm999" wrote in message
...

I have the following code:

Windows("Alex").Activate
Columns("A:A").Select
Set oFound = Columns(1).Find(WHAT:="EXT", _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=True)
If Not oFound Is Nothing Then
oFound.Activate
If Trim(oFound) = "EXT" Then
ActiveCell.Offset(rowOffset:=0, columnOffset:=3).Activate
Selection.Copy
Windows("BOOK1.XLS").Activate
Range("E3").Select
ActiveSheet.Paste
Application.Goto oFound
End If
End If

How can i get it to Add the contents of this cell to another cell using
VB?
Any example?


--
alexm999
------------------------------------------------------------------------
alexm999's Profile:

http://www.excelforum.com/member.php...fo&userid=4918
View this thread: http://www.excelforum.com/showthread...hreadid=261340





All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com