Kamis, 17 Mei 2012

Re: [ExcelVBA] need to find a specific column in a table

 

Hi,

i have not tested this code but hope it may works.

sub test()
dim i as integer
for i= 1 to 30 'Total no. of columns
if cells(2,i).value="MAX*" or cells(2,i).value="DS*" then
msgbox columns(i) & " contains Part Number"
end if
next i
end sub

it search 2nd row & if found part no then msgbox displays.

On Thu, May 17, 2012 at 10:53 AM, sunnywulf
<wolfram.schneider@maxim-ic.com>wrote:

> **
>
>
> I have an Excel table where one of the columns contains our company's part
> number. This part number has the prefix MAX or DS followed by a number that
> is at least 3 digits long (examples: MAX123 or DS987).
>
> The table dimensions can be several hundred rows and up to 30 columns. The
> column with the part number has no fixed location and can be anywhere.
>
> How can I determine in VBA the number of the column that contains the Part
> Number?
>
> I did not find anything wen googling this question. I hope somebody can
> help me with this challenge.
> Thank you for your replies,
> sunnywulf
>
>
>

--

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar