New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

data aquistion through excel

Macros, VBA, Excel Automation, etc.

data aquistion through excel

Postby gabbie » Sun Jan 22, 2012 6:46 am

I am currently gathering data in an excel spreadsheet by means of a msquery. I have created code to run an update via vba code. Thanks to your help! As each value that is updated in the spreadsheet, it is used in a formula to evaluate changes. Each time this change meets the alarm criteria, I need to log it in a file for further review. I know that I can create an if-then statement in VBA, but how do I get it to log or print on to another file(sheet) for further review, in order of occurance, keeping each time an alarm condition occurs?

Any help is always appreciated.

thanks,
Gabbie
  • 0

gabbie
Rookie
 
Posts: 7
Joined: Jan 9, 2012
Reputation: 0

Re: data aquistion through excel

Postby Sisyphus » Sun Jan 22, 2012 8:21 am

Hello Gabbie,
That isn't so difficult. You can write on another worksheet in the same workbook or you can write on any of the worksheets in another workbook. But in order for us to help you it is best if you show us the data and show us where you want them - we will find some way to do the rest.
So, the best way will be to design the worksheet that will have the alarm reports. Each alarm, I presume, will have one line. With the design of the worksheet will come the design of that line. So, you will ask for code to open the workbook, find the worksheet, write the line, and clsoe the workbook again. All of that action to be triggered by some even that you may or may not ask us about. The line to consist of data whose computation you may or may not ask us about. All of that will become clear with the design of the 'alarm' worksheet.
Once you have designed it, post it. :D
And tell us whether it isin the same workbook or another one.
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010


Return to Macros and VBA Questions

Who is online

Users browsing this forum: No registered users and 290 guests