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: 4
Default Date Match Input Macro

Hi,

I have been working on this thing for the past couple of days not. Finally got somwhere with some help. Thanks. However, I am still not fully there. My problem lies as follows.

Sheet1
A B C

Row1 Date Cured Follow Up
Row2 1/2 2 1
Row3 1/3 3 2
Row4 1/4
Row5



Sheet2

Date: 1/4

Acct # Cured Follow Up
546 Y N
455 Y N
445 N N
775 Y Y

Totals: 3 1

When I run my macro it enters the data from the total line in sheet 2 in row 5 when I want the date entered into row 4 in column B. Second problem. Sheet 2 is my daily tabulation sheet. It changes daily, I have entered the "TODAY()" function so it can show the correct date always on sheet 2. Now, how can I have the "TODAY()" function match the date inputed in column A of sheet 1. What I would like is for Sheet 2 to recognize the date from sheet 1 and input the data into the corresponding row for that date. No luck yet in figuring that out. I need help! So if anyone can figure this out, that would be great. Here is the macro I am using thus far. It just inputs the data in the last totally blank row, which I do not want. Thanks again. Please help.


Function LastRow(sh As Worksheet)
On Error Resume Next
LastRow = sh.Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function
Sub copy_1()
Dim sourceRange As Range
Dim destrange As Range
Dim Lr As Long
Lr = LastRow(Sheets("Chambers")) + 1
Set sourceRange = Sheets("Sheet1").Range("d30:i30")
Set destrange = Sheets("Chambers").Range("d" & Lr)
sourceRange.Copy destrange
End Sub
Sub copy_1_Values_PasteSpecial()
Dim sourceRange As Range
Dim destrange As Range
Dim Lr As Long
Application.ScreenUpdating = False
Lr = LastRow(Sheets("Chambers")) + 1
Set sourceRange = Sheets("Sheet1").Range("d30:i30")
Set destrange = Sheets("Chambers").Range("d" & Lr)
sourceRange.Copy
destrange.PasteSpecial xlPasteValues, , False, False
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Sub copy_1_Values_ValueProperty()
Dim sourceRange As Range
Dim destrange As Range
Dim Lr As Long
Lr = LastRow(Sheets("Chambers")) + 1
Set sourceRange = Sheets("Sheet1").Range("d30:i30")
With sourceRange
Set destrange = Sheets("Chambers").Range("d" & Lr). _
Resize(.Rows.Count, .Columns.Count)
End With
destrange.Value = sourceRange.Value
End Sub


 
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
Macro or Formula to have a cell match the date on the tab. Cindy Excel Discussion (Misc queries) 4 September 30th 09 07:56 PM
Input 'MATCH' If Match Cue Excel Discussion (Misc queries) 3 November 1st 08 02:10 PM
How do I include a date input box in a macro? Project Mgr Excel Discussion (Misc queries) 6 June 19th 08 04:52 PM
How do I include a date input box in a macro? Project Mgr[_2_] Excel Discussion (Misc queries) 0 June 19th 08 04:21 PM
run macro with input msg based on cell input Janelle S Excel Discussion (Misc queries) 0 January 20th 08 05:23 AM


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

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

About Us

"It's about Microsoft Excel"