LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default VB code needed as this is way beyond a novice like me!

in worksheet "adhoc" cell X9 is populated with formula =TODAY()
and cells X12:X25 are blank so that user can input data into them (in form
of text)

on execution I need some code that will carry out a serach of column 'N' in
"database" worksheet and paste the copied data ( X9, X12:X25 in "adhoc") into
the next available row of column 'N' ONLY if the date in cell ref X9 of
"adhoc" has not been found in column 'N' of "database"

On execution, if the data is found then only copy the data from cells
X12:X25 in "adhoc" that are not already present in cells O:AB of the
corresponding row that the date has been found.

eg

in "adhoc" worksheet:-

X9 = 10 October 2005
X12 = Mr Smith
X13= Mr Jones
X14= Mr Green
X15:X25 are blank

the search of column 'N' in "database" is carried out , and the date found
in X9 of "adhoc" has not been found. So X9, X12,X14 are copy/pasted into the
first available row in column 'N' of "database"

....however....

if the search of column 'N' in "database" does indeed find the date in X9 of
"adhoc" only the cells not alraedy there are pasted.

eg

in cell N22 of "database" 10 October 2005 is found
cell O22 holds the data "Mr Smith" and cells P22:AB22 are blank, so the data
back in cell X13 of "adhoc" (Mr Jones) needs to be added to cell P22 of
"database", cell X14 (Mr Green) needs to be added to Q22
....and so on....

Once this little trick has been performed, sheet "adhoc" is displayed and a
simple "done" msg displayed.

I hope I have explained that ok, and sorry for the waffle

realy apreciate a fix for this, as I said its total beyond me!
many thanks in advance

 
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
A macro code question from a novice Richard Excel Discussion (Misc queries) 2 December 24th 07 07:22 PM
Help needed with VBA code Sam Hill Excel Discussion (Misc queries) 1 May 9th 06 02:29 PM
VBA code Help needed liamothelegend Excel Programming 1 November 5th 03 12:25 PM
code needed ibo Excel Programming 0 July 29th 03 05:32 PM


All times are GMT +1. The time now is 04:07 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"