Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search one worksheet to pull data into another worksheet | Excel Worksheet Functions | |||
Search one worksheet for values in another worksheet? | Excel Discussion (Misc queries) | |||
Search for worksheet name | Excel Programming | |||
Search for worksheet | Excel Programming | |||
Create a search Field within a worksheet to search command buttons | Excel Programming |