Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if not there, add/insert 2

Status
Not open for further replies.

monagan

Technical User
May 28, 2004
138
US
I have sheet1 which a user enters in information. Name Date and WorksheetName

In a different workbook, If it doesn't find Name I want it to add it after the last name in column A. If it doesn't find date, I want it to add it after the last date in row 2. And if it doesn't find the worksheet, I want it to insert a new worksheet.

Any advice?

"We have enough youth, How about a fountain of SMART?
 
Loomah,

Thanks for all your help. I really appreciate everything.

"We have enough youth, How about a fountain of SMART?
 
Loomah,

I got something good here. But of course, a question is coming with it. I found this, which works, it sets fnd, to what I need.

Set fnd = Cells.Find(what:=EDate, LookIn:=xlValues, LookAt:=xlPart, _SearchOrder:=xlByRows,SearchDirection:=xlNext, _ MatchCase:=False)

After running it through, the intersection code:
IntersectCol = fnd.Column

is 8, when it should be 2, or whatever. It's just off, and I don't know why

"We have enough youth, How about a fountain of SMART?
 
nevermind, that's not working either

"We have enough youth, How about a fountain of SMART?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top