Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I need to find the word books then go three columns along and multiply the cell value by 2. the macro should then look for every occurence of the word books and do this, if the word books is not found I'd like it to continue to the next part of the macro...... I appreciate your help, thanks so much, im too old to learn this but you all saved me alot of time in my work, Andrea |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look at Find and FindNext in VBA help.
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) wrote in message ups.com... Hi, I need to find the word books then go three columns along and multiply the cell value by 2. the macro should then look for every occurence of the word books and do this, if the word books is not found I'd like it to continue to the next part of the macro...... I appreciate your help, thanks so much, im too old to learn this but you all saved me alot of time in my work, Andrea |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bob,
I have but I dont understand how it works and how i can find a word in column B and change the value in column C corresponding with that, Can you help with a simple macro for this please? Andrea On 7 Jun, 12:55, "Bob Phillips" wrote: Look at Find and FindNext in VBA help. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) wrote in message ups.com... Hi, I need to find the word books then go three columns along and multiply the cell value by 2. the macro should then look for every occurence of the word books and do this, if the word books is not found I'd like it to continue to the next part of the macro...... I appreciate your help, thanks so much, im too old to learn this but you all saved me alot of time in my work, Andrea- Hide quoted text - - Show quoted text - |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub UpdateData()
Dim oCell As Range Dim sFirst As String With Worksheets("Sheet5").Range("B:B") Set oCell = .Find("word", LookIn:=xlValues) If Not oCell Is Nothing Then sFirst = oCell.Address Do oCell.Offset(0, 1).Value = oCell.Offset(0, 1).Value * 2 Set oCell = .FindNext(oCell) Loop While Not oCell Is Nothing And oCell.Address < sFirst End If End With End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) wrote in message oups.com... Hi Bob, I have but I dont understand how it works and how i can find a word in column B and change the value in column C corresponding with that, Can you help with a simple macro for this please? Andrea On 7 Jun, 12:55, "Bob Phillips" wrote: Look at Find and FindNext in VBA help. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) wrote in message ups.com... Hi, I need to find the word books then go three columns along and multiply the cell value by 2. the macro should then look for every occurence of the word books and do this, if the word books is not found I'd like it to continue to the next part of the macro...... I appreciate your help, thanks so much, im too old to learn this but you all saved me alot of time in my work, Andrea- Hide quoted text - - Show quoted text - |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks so much Bob,
It worked without problems, Andrea On 7 Jun, 14:49, "Bob Phillips" wrote: Sub UpdateData() Dim oCell As Range Dim sFirst As String With Worksheets("Sheet5").Range("B:B") Set oCell = .Find("word", LookIn:=xlValues) If Not oCell Is Nothing Then sFirst = oCell.Address Do oCell.Offset(0, 1).Value = oCell.Offset(0, 1).Value * 2 Set oCell = .FindNext(oCell) Loop While Not oCell Is Nothing And oCell.Address < sFirst End If End With End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) wrote in message oups.com... Hi Bob, I have but I dont understand how it works and how i can find a word in column B and change the value in column C corresponding with that, Can you help with a simple macro for this please? Andrea On 7 Jun, 12:55, "Bob Phillips" wrote: Look at Find and FindNext in VBA help. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) wrote in message roups.com... Hi, I need to find the word books then go three columns along and multiply the cell value by 2. the macro should then look for every occurence of the word books and do this, if the word books is not found I'd like it to continue to the next part of the macro...... I appreciate your help, thanks so much, im too old to learn this but you all saved me alot of time in my work, Andrea- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find, Copy offset to offset on other sheet, Run-time 1004. | Excel Programming | |||
macro -find all occurences of a word-change color of cell of all | Excel Programming | |||
find word in a cell then change cell format | Excel Programming | |||
vba help pls - find min based on a condition and return val of an offset cell | Excel Programming | |||
VBA: Add cell value to another worksheet cell using Find and offset | Excel Programming |