snowmansmartie
New Member
- Joined
- Jun 19, 2013
- Messages
- 14
Hi guys,
I have a really easy problem that someone with half a brain cell will do in about 3 seconds, but it seems that I lost my half of a brain cell and figure this out.
I have a table of 4 columns, I want to iterate through the 4th column and if it finds a cell = to True then return the information in the other 1st 3 columns of that same row:
<TBODY>
</TBODY>
Assume the above is top left cell is A2 down to D3.
The code I currently have is:
The above gives a blank result within the CasesList variable. If I change the .Value to .Select I then get the results of the D column where D = True.
This shouldnt be beyond me, but I've been looking at this for hours and just cant figure out what I have got wrong.
Any help would be appreciated.
Cheers
I have a really easy problem that someone with half a brain cell will do in about 3 seconds, but it seems that I lost my half of a brain cell and figure this out.
I have a table of 4 columns, I want to iterate through the 4th column and if it finds a cell = to True then return the information in the other 1st 3 columns of that same row:
19/06/2013 | ABC Company | 123456 | True |
18/06/2013 | 123 Biz Ltd | 654321 |
<TBODY>
</TBODY>
Assume the above is top left cell is A2 down to D3.
The code I currently have is:
Code:
For Each c In Worksheets("Sheet1").Range(A2:D3).Cells
TempRange = ""
TempRange = "A" & c.Row & ":" & "C" & c.Row
If c.Value = "True" Then
CasesList = CasesList & Range(TempRange).Value & vbNewLine
End If
Next
The above gives a blank result within the CasesList variable. If I change the .Value to .Select I then get the results of the D column where D = True.
This shouldnt be beyond me, but I've been looking at this for hours and just cant figure out what I have got wrong.
Any help would be appreciated.
Cheers