View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
___Zoom ___Zoom is offline
external usenet poster
 
Posts: 8
Default macro problem related with all worksheets

Thank you Mike...I'll try it and get back to here again to comment.
___Zoom

"Mike H" wrote:

Try this:-

Alt+F11, insert module and paste it in

Sub versive_Element()
mydate = Range("A1").Value
mytext = Range("A2").Value
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Select
Range("F1:F10").Select
For Each c In Selection
c.Select
If c.Value = mydate Then
ActiveCell.Offset(0, -5).Value = mytext
End If
Next c
Next ws
End Sub

It will pick up the date and text from A1 and A2 on the sheet it is called
from

Mike


"___Zoom" wrote:

Hi, I have a workbook with a lot of worksheets. I need to write a macro that:
a) takes an input of date in (dd.mm.yyyy) format.
b) takes an input of some txt
c) Search each and every worksheet column F to find that spesific date
d) If such date is present, write the text input to column A at the same row
where the the date has found.
Can anyone help me to solve this problem?
THank you for your help
E.C.