LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bud Bud is offline
external usenet poster
 
Posts: 61
Default getting Cell2.value=empty when their are values in the column

Hello

When I run through F8 in the following code I am getting Cell2.value is
empty when it reads down through columnA. This is true for every row except
for the first row. It shows me the value of what is in A1. After that I get
EMPTY.

The worksheet that I am reading has 3 reports in it and is standard. I only
want to process what comes out of the 1st report in that 1 worksheet. I don't
care about the other 2 reports in that 1 worksheet. So I am trying to count
the number of rows before I reach the 2nd report. the 2nd report starts with
"Project assignments".

What is wrong with this code?
Dim br As Long
br = 0
Sheets("SAPTasks").Select
Cells.Select
Columns("a:a").Select
Dim Cell2 As Range

For Each Cell2 In Selection
If Cell2.Value = "Project assignments" Then
Exit For
End If
br = br + 1
Next Cell2




 
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
Delete Rows with Empty Cells with empty column 1 Scott Excel Programming 5 October 2nd 06 11:57 PM
Find Empty Column and paste cell values Mike Excel Programming 6 December 28th 03 08:31 PM
SOS VBA Code Emergency: need to copy tell to empty cell direct below where values in adjacent cells in different column are equal to each other. Steven Rosenberg Excel Programming 4 August 5th 03 05:05 AM


All times are GMT +1. The time now is 10:42 PM.

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"