Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is a code that Joel so kindly wrote for me, I add some range and delete
some, but now I can not make it work right. I want to update the previous data using the data entry sheet, but I cant make it write all the data from the (the cells next to the ID) row to the data entry sheet (Entry) or send the data back to the data sheet (data). Would somebody mind helping me with this? Sub GetData() Set EntrySht = Sheets("Input") Set DataSht = Sheets("Data") ID = EntrySht.Range("Q2") 'See if ID already exists Set c = DataSht.Columns("B").Find(what:=ID, LookIn:=xlValues, lookat:=xlWhole) If c Is Nothing Then 'clear Entry Sheet EntrySht.Range("Q2").ClearContents Else 'move old data from data sheet to entry sheet With DataSht DataRow = c.Row 'to entry sheet EntrySht.Range("E5,I5,M5,C7,I7,M7,C7,C9,F9,I9,M9,E 11,F19,D21,D26,D33,C36") = .Range("C" & c.Row) End With End If End Sub Sub Submit() Set EntrySht = Sheets("Input") Set DataSht = Sheets("Data") ID = EntrySht.Range("Q2") 'See if ID already exists Set c = DataSht.Columns("B").Find(what:=ID, LookIn:=xlValues, lookat:=xlWhole) If c Is Nothing Then LastRow = DataSht.Range("B" & Rows.Count).End(xlUp).Row NewRow = LastRow DataRow = NewRow Else DataRow = c.Row End If 'Enter your code here to move data from entry sheet 'to data sheet DataSht.Range("C" & DataRow) = EntrySht.Range("E5,I5,M5,C7,I7,M7,C7,C9,F9,I9,M9,E 11,F19,D21,D26,D33,C36") End Sub Thank you. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Make a product that works | Excel Worksheet Functions | |||
Excel 2002: How to make the formula works ? | Excel Discussion (Misc queries) | |||
How to make a null cell as 0 (Zero) so that the subtraction works | Excel Worksheet Functions | |||
Make table query works intermittently | Excel Programming | |||
I would like to make a schedule for my dept. Who works what days . | Charts and Charting in Excel |