LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Michael
 
Posts: n/a
Default Find the cell value in excel by using vb code

Hi.

I'm trying to write a vb code that find a Row and a Column in worksheet2
that i called PoF (headline)
It looks like this

Row/Column: a b c d e
1
2 PoF
3
4 6
5 6
6 8

The name is PoF because i will use the same code in different sheets and the
name PoF in different Columns/Rows

The code is a loop.

W = Worksheets(2).Range("PoF").Row
' This will give me the Row, but i also need to find the Column.

'Then a i also need the code to find the first cell that includes a number

Number = (Worksheets(2).Range("d4").Value) ' this will give me the value 6
in the example
'but i cant put "d4" etc in every code in every sheet, is there a code to
fix this?

numberRow = Worksheets(2).Range("First number").Row
'The cell that includes the first number??

for i=numberRow (as row number) to the end of row?? (to the last cell
number) step 1

If number = 6 then
w10="Ok"
ElsIf
w10="Try again"
end if

Next mumber

Next numberRow

Please help me!

 
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM
Using Jet to read excel file returns blank for last cell - sometim Ron Excel Discussion (Misc queries) 1 December 9th 04 08:21 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 03:36 AM.

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

About Us

"It's about Microsoft Excel"