Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exception Reporting!!! Never b4 replied? 1

Status
Not open for further replies.

sgteh

IS-IT--Management
Dec 13, 2002
8
MY
Hello guys, glad to be back,

Anybody can help here? V URGENT, argh...

My workbook consists of 16 worksheets which in turn have questions to be answered either "Yes" or "No" and also a "Comments" column.

How VBA were to list all "No" answers into a new Exception worksheet together with the "Comments"?

I have tried to creat the Exception worksheet based on copying all other 16 worksheets into it and then autofiltering. It works, but the file hangs on and off due to it using too much processing memory.

Thanks,
SG
 
SG,

Add a new sheet.
Loop thru all other sheets, grabbing data and writing to the new sheet.
Code:
dim wsNew as Worksheet, ws as worksheet, r as long
set wsNew = workbooks.add
with wsnew
  .name = "Summary"
  cells(1,1).value = "Heading 1"
'...Summary column headings, etc.
end with
for each ws in worksheets
  if ws.name <> &quot;Summary&quot; then
    r = wsnew.cells(1,1).currentregion.rows.count + 1
    StuffForHeading1Data = ws.whatever...
...
    wsnew.cells(1, 1).value = StuffForHeading1Data
  end if
next
set wsnew = nothing
??? :)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top