Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
goto next line
dim DataWks as worksheet
dim res as variant 'could be an error dim myKey as string dim NextRow as long set datawks = worksheets("Data") mykey = "idnumbergoesheresomehow" with datawks 'key is in column A of res = application.match(mykey,.range("a:a"),0) if iserror(res) then 'key not in column A of data worksheet nextrow = .cells(.rows.count,"A").end(xlup).row + 1 'plop the values in .cells(nextrow,"A").value = mykey .cells(nextrow,"B").value = "somethingelse" .... else 'key is in column A and is in row # res end if Miree wrote: I am new to macros and the like. I have a pretty input sheet for people to put data in, I need to export it in to another work sheet(i know to do this) but the form gets cleared and more data added. I need the data to be entered into the next blank line, this i dont know how to do. The data also has an identifier number I need there to be a check that the number doesnt already exist in the stored data, if it is i need the option to overwrite data or give to it the next number in the series new numer. I would like an explination of the code if possible, rather than a cut and paste job. Thank you -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to convert a dotted line to a solid line in a line graph | Charts and Charting in Excel | |||
advanced filter, goto next line(record) | Excel Programming | |||
Macro problem on, Yellowed line - previous line or next line. | Excel Programming | |||
On Error Goto doesn't goto | Excel Programming | |||
On Error Goto doesn't goto | Excel Programming |