Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Paste special validation

I have a sheet the updates values with a macro. I would like the macro to
verify the date and copy and paste the values on the rows with the current
date only. The current date is listed in one of the cells(1,14).





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Paste special validation

Sub copyWithValidDateOnly
Dim Z as integer
Dim TheDt as date
Dim Fnd as double
Dim Y as double
Dim DataArray(500,5) as variant
let TheDt = cells(1,14).value
let x=1
Do while true
if cells(x,1).value=empty then exit do 'assumes that if no date in column
1, then
'you'd just jump out of the process.
if cells(x,1).value=TheDt then
Fnd=Fnd+1
for Y=1 to 5
dataarray(fnd,Y)=cells(x,Y).value
Next
end if
x=x+1
Loop

if fnd0 then
windows("writeout.xls").select
'goto the area to write new data (no idea how to tell you to do that)
let Y=activecell.row
for X=1 to Fnd
for Z=1 to 5
cells(y,Z).value=dataarray(x,Z)
next
y=Y+1
Next
end if

End sub

"Rpettis31" wrote:

I have a sheet the updates values with a macro. I would like the macro to
verify the date and copy and paste the values on the rows with the current
date only. The current date is listed in one of the cells(1,14).





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
Paste validation, Copy, Paste Special Validation Scott Excel Programming 0 December 19th 06 09:54 PM
Data Validation - Copypaste special problem WCM Excel Discussion (Misc queries) 2 October 24th 06 02:13 AM
Paste Special - Validation Lori-Wheaten Excel Discussion (Misc queries) 0 July 21st 06 03:18 PM
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. stan-the-man Excel Worksheet Functions 7 June 14th 06 08:10 PM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM


All times are GMT +1. The time now is 01:14 AM.

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"