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 danielledunham on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross reference whole column inside text field of another column ?

Status
Not open for further replies.

browserice

Technical User
Aug 20, 2006
21
US
I have a 2 excel files :

File-Name (list of problem types)

Column-Name
authority
Disk space
timer
timeout


File-Log (activity log)

Column-Type Column-Log
[empty] adja sdhajsdhfklaj authority hasldjf
[empty] adjasdha timer hfklajdl fjasdkljfhasldjf
[empty] ad disk space jasdhajsd sldjf
[empty] adjasdhajsdhfklajdlfjasdk timeout
[empty] adjasdhajsdhfklajdlfjasdkljfhasldjf


For each records of File-Log, I have to put in Column-Type the value of the Column-Name found in the text of Column-Log.

How can I do this ?

THis is for a co-worker who has a hudge file to process like this and I want to save him time in doing it.
 



Hi,

So what code do you have so far? Where do you need a tip?

Skip,

[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue]
 
None.

I was hoping to have the whole code. I figured it would be longer then 10 lines (20 at the most).

I haven't done VB scripts in a very long time. I forgot everything.

My point is not to learn how to do it. This is a one shut deal. I do not have time to learn how to find the code on my own. We sort of need this a.s.a.p. I was told if I couldn't find out how withing 2-3 hours, then to forget about it. I am at work and I do not have time to invest in coding myself.

I eventualy want to learn VB Script but not now. I do not have the time.
 



This is not VB Script. It's VBA.

Check out the Find function.

Skip,

[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue]
 
But isn't VBA visual script you can attach to an Excel file and have it executed inside Excel ?
 



VBS and VBA have differences. Yes, VBA executes within an application.

Skip,

[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue]
 
Bottom line: what have you tried so far and where in your code are you stuck ?
 



Here's some code you might play with...
Code:
dim r as range
for each r in workbooks("list of problem types.xls").sheets(1).cells(1,1).Currentregion
  msgbox r.value
next


Skip,

[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top