Looping...

MI man

Registered User.
Local time
Yesterday, 20:48
Joined
Nov 23, 2008
Messages
59
I have a report coming from COGNOS in the form of Excel spreadsheet.

I want to take the required values from the exported sheet into the table that I have (in Excel).

The Exported spreadhseet (coming from COGNOS) consists of various rows which vary from user to user and time to time. The pattern to pick out is that it starts at a definite row, say row no: 8, but don't know where it ends..but whereever it ends, it sums up all the values, the field name of which is 'Total'...
So whereever this 'total' is occuring I have to terminate the loop and copy all the values from row 8 to (total-1) th row...

Each Excel sheet consists of two tables and One 'Total' value for each table...

Can anybody help me with the loops regarding this...reading the value in a cell until it becomes true...??

I tried Do Until.....but it is not reading the cell value...dont know whats wrong...
Please help with the loops..
 
Why not try posting the code you tried and maybe someone will see where you could make some changes. Don't forget to use the code tags (the # button).
 
Why data mine the excel report when you can simply draw upon cognos directly?
 
Don't know anything about COGNOS so possibly namliam has the correct answer (question?).

However

Do Until UCase(ActiveCell.Value) = "TOTAL"

should work. I force the UCase to avoid any problems.


Brian
 
Possibly add "Left(Ucase(),5)" to make sure no other data is present? LIke a : or what ever?
Possibly even Trim to exclude spaces too?

Mining a report to extract data to probably report upon again (or send into some kind of database/table/whatever) is a bad idea, a Bad idea, BAD BAD idea, a REALLY REALLY BAD BAD idea (guess you get the idea :P )
 

Users who are viewing this thread

Back
Top Bottom