Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default search worksheet

I am making an automated reporting system for a bank. I copy information from
another program and insert it into excel. The information is columns with
headllines. Since the order of the info is somewhat different each time I
want to write a macro that identifies the headlines and places the
information in proper order. (I am a beginner in VisualBasic). Very thankful
for fast relpy!
--
banker
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default search worksheet

Assume our headers are in Row 1 of whichever sheet you need to search. You
can find which column they are in with

Dim sHdr as String, sh as Worksheet, rng as Range
Set sh = Worksheets("SheettoSearch")
sHdr = "LastName"
set rng = sh.Range("A1:IV1").Find(sHdr)
if not rng is nothing then
msgbox "Found at " & rng.Address(0,0,xlA1,True)
Else
msgbox sHdr & " Not found"
end if

--
regards,
Tom Ogilvy



"anderssweden" wrote:

I am making an automated reporting system for a bank. I copy information from
another program and insert it into excel. The information is columns with
headllines. Since the order of the info is somewhat different each time I
want to write a macro that identifies the headlines and places the
information in proper order. (I am a beginner in VisualBasic). Very thankful
for fast relpy!
--
banker

Reply
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
Search one worksheet to pull data into another worksheet HyperMite Excel Worksheet Functions 6 March 4th 09 01:53 PM
Search one worksheet for values in another worksheet? ClayShooters Excel Discussion (Misc queries) 1 July 4th 06 03:01 PM
Search for worksheet name Phil Excel Programming 3 May 26th 06 06:18 PM
Search for worksheet jarvis1979 Excel Programming 2 July 6th 05 05:31 PM
Create a search Field within a worksheet to search command buttons Ed P[_2_] Excel Programming 1 December 14th 04 08:04 PM


All times are GMT +1. The time now is 04:31 PM.

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

About Us

"It's about Microsoft Excel"