vamshedhar
New Member
- Joined
- Oct 3, 2013
- Messages
- 8
I am having a row with values from 21 to 45 and continued again from 1 to 25
[TABLE="width: 500"]
<tbody>[TR]
[TD]Some unknown number of rows in the beginning[/TD]
[TD]25[/TD]
[TD]26[/TD]
[TD]...[/TD]
[TD]40[/TD]
[TD]41[/TD]
[TD]42[/TD]
[TD]43[/TD]
[TD]44[/TD]
[TD]45[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD].[/TD]
[TD].[/TD]
[TD]24[/TD]
[TD]25[/TD]
[/TR]
</tbody>[/TABLE]
to find column position of "1" i am using code
Worksheets("sheet1").Rows(2).Find(What:="1", LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False).Column
But it is returning column number of 31 and when i delete or hide that column it returns column number of 41.
Cant i search for exact value 1 in my row???
[TABLE="width: 500"]
<tbody>[TR]
[TD]Some unknown number of rows in the beginning[/TD]
[TD]25[/TD]
[TD]26[/TD]
[TD]...[/TD]
[TD]40[/TD]
[TD]41[/TD]
[TD]42[/TD]
[TD]43[/TD]
[TD]44[/TD]
[TD]45[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD].[/TD]
[TD].[/TD]
[TD]24[/TD]
[TD]25[/TD]
[/TR]
</tbody>[/TABLE]
to find column position of "1" i am using code
Worksheets("sheet1").Rows(2).Find(What:="1", LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False).Column
But it is returning column number of 31 and when i delete or hide that column it returns column number of 41.
Cant i search for exact value 1 in my row???