ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to loop thru cell in 2 columns (https://www.excelbanter.com/excel-programming/349845-how-loop-thru-cell-2-columns.html)

DMB

how to loop thru cell in 2 columns
 
How do I get the cell information From the E cels based on the F cells

Dim sht As Worksheet
Dim cel As Range
Dim j As Integer
For Each sht In Worksheets
For Each cel In sht.Range("E:E")
If Cel= TotalHours.Projects.Text Then
'TotalHoursToDate.Text = TotalHoursToDate.Text +
Range(Sheet1!Range("E" + j))
'TotalHoursToDate.Text = 33
End If
Next cel
Next sht


JNW

how to loop thru cell in 2 columns
 
I think anyone here will need more information in order to help you out.

"DMB" wrote:

How do I get the cell information From the E cels based on the F cells

Dim sht As Worksheet
Dim cel As Range
Dim j As Integer
For Each sht In Worksheets
For Each cel In sht.Range("E:E")
If Cel= TotalHours.Projects.Text Then
'TotalHoursToDate.Text = TotalHoursToDate.Text +
Range(Sheet1!Range("E" + j))
'TotalHoursToDate.Text = 33
End If
Next cel
Next sht



All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com