Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Find cell and paste data

I have the following code, broken :o(

What I am trying to do is if the date in A1 is in column F, select the cell
one to the right to the one with the date. Into this cell paste the value
from K1

Thanks Blue


Sub finddate()

Dim entereddate As Date
entereddate = Range("A1").Value

Dim founddate As String

Dim sqm As Long
sqm = Range("K1").Value

Dim column As Range, finddate As Range
Set column = Range("F:F")
For Each finddate In column
If finddate.Value = entereddate Then finddate.Select

Next finddate

Cells(ActiveCell.Row, ActiveCell.column + 1).Select
founddate = ActiveCell.Address

Cells(sqm).Select
Selection.Copy

Cells(founddate).Select

End Sub


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find matching date in another worksheet, copy and paste data Shoney Excel Discussion (Misc queries) 1 November 8th 07 11:45 PM
Find, Match data and paste data between two workbooks Chuckak Excel Discussion (Misc queries) 0 September 1st 06 06:59 PM
Macro to find text string in a column and paste data in another nicolascap Excel Discussion (Misc queries) 8 March 14th 06 03:13 PM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:45 AM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:23 AM


All times are GMT +1. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"