Creating a worksheet from others (IF statement)

Hi Guys,

I tried looking fort his answer and I think it is answered in parts of other 
questions but I cant get it together.

Scenario:

I have a file called invoices.xls which is a workbook of 12 monthly 
worksheets for the year. Each item in a monthly worksheet is a row that 
houses project information financials etc (project cost, outsourced cost, 
project name etc)

We also have another file (wip.xls) where we double handle all of that 
information and cut and paste only those files that we are currently working 
on.

I would like wip.xls to be automatically populated with certain cells from 
invoice.xls

I would like to add a column into invoice.xls called 'WIP' and IF the cell 
contains a 'Y' (meaning we are currently working on it) it appears in the WIP 
document, If it does not contain a 'Y' then it is not included in the WIP 
document. (Even better if I put in a checkbox)

I have no idea how to do this. The other thing is, can I then go and add 
extra cells in each row in the WIP file without causing a problem. I would 
like to open WIP and add a column which holds what people are currently 
working on it, but I dont have this data in invoice.xls, nor do I want it in 
invoice.xls.

Any help would be appreciated.

McKean
0
McKean (2)
10/27/2004 1:15:02 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
544 Views

Similar Articles

[PageSpeed] 55

McKean,

I'm pretty sure that you can do this,  whenever you open wip.xls, you can 
set it to update from invoice.xls.

Below is some code which should work ;)

I'm going to assume that your data has no blank lines in amongst the data 
set, and that the column with the "y"s is column J (ie) the 10th column.  
Just make adjustments as necessary

you can then call this macro in the "workbook_open" event of wip.xls

sub UpdateWip()
   dim mySheet as worksheet
   dim counter as integer
   dim i as integer

   Range("a2", Cells(Range("a1").CurrentRegion.Rows.Count, 9)).Delete
      ' this clears the data in wip.xls except for the first row
   workbooks.open("C:\MyFolder\invoice.xls")
      'obviously adjust this so that it points to the correct file
   counter = 2
      'this just will start the paste in wip.xls in row 2

   for each mySheet in Worksheets
      mySheet.select
      for i = 1 to Range("a1").currentRegion.rows.count
         if cells(i,10).value = "Y" then
               Range(cells(i,1),cells(i,9)).copy
               Windows("wip.xls").activate
               Cells(counter,1).pastespecial paste:=xlValues
               application.cutcopymode = false
               Windows("invoice.xls").activate
               counter = counter + 1
         end if
      next i
   next mySheet
end sub

I have tested this to some extent. I hope that it helps you.  I haven't used 
a checkbox, you can always adjust the code to handle that instead of a "Y".

Katie

"McKean" wrote:

> Hi Guys,
> 
> I tried looking fort his answer and I think it is answered in parts of other 
> questions but I cant get it together.
> 
> Scenario:
> 
> I have a file called invoices.xls which is a workbook of 12 monthly 
> worksheets for the year. Each item in a monthly worksheet is a row that 
> houses project information financials etc (project cost, outsourced cost, 
> project name etc)
> 
> We also have another file (wip.xls) where we double handle all of that 
> information and cut and paste only those files that we are currently working 
> on.
> 
> I would like wip.xls to be automatically populated with certain cells from 
> invoice.xls
> 
> I would like to add a column into invoice.xls called 'WIP' and IF the cell 
> contains a 'Y' (meaning we are currently working on it) it appears in the WIP 
> document, If it does not contain a 'Y' then it is not included in the WIP 
> document. (Even better if I put in a checkbox)
> 
> I have no idea how to do this. The other thing is, can I then go and add 
> extra cells in each row in the WIP file without causing a problem. I would 
> like to open WIP and add a column which holds what people are currently 
> working on it, but I dont have this data in invoice.xls, nor do I want it in 
> invoice.xls.
> 
> Any help would be appreciated.
> 
> McKean
0
Katie (75)
10/27/2004 7:31:02 AM
Hi Katie,

Thanks for this, but at the risk of you possibly having wasted your time 
here, I have decided that the problem is far more complicated that I last 
thought and may not even be possible.

I cant have the sheet automatically update because I will lose data that I 
have added from the last time.

To explain:

On the very first instance of opening the spreadsheet (call it week 1) I 
would like it to populate, as you have replied to earlier. I would then add 
in a column of what the current progress is for this week (this column does 
no exist in invoice.xls) I would print it and present it at a meeting.

The next time I open the spread sheet, if any rows that had a 'y' in them 
previously have since had that 'y' removed, I would like that row deleted.

Any rows that had a 'y' and still have a 'y' I would like to stay as they are

Any row that didn't have a 'y' (or didnt exist) and now has a 'y' I would 
like added to the wip document.

I think this will cause a world of pain to even the best expert. Maybe I 
should go back to double handling :)

McKean

"Katie" wrote:

> McKean,
> 
> I'm pretty sure that you can do this,  whenever you open wip.xls, you can 
> set it to update from invoice.xls.
> 
> Below is some code which should work ;)
> 
> I'm going to assume that your data has no blank lines in amongst the data 
> set, and that the column with the "y"s is column J (ie) the 10th column.  
> Just make adjustments as necessary
> 
> you can then call this macro in the "workbook_open" event of wip.xls
> 
> sub UpdateWip()
>    dim mySheet as worksheet
>    dim counter as integer
>    dim i as integer
> 
>    Range("a2", Cells(Range("a1").CurrentRegion.Rows.Count, 9)).Delete
>       ' this clears the data in wip.xls except for the first row
>    workbooks.open("C:\MyFolder\invoice.xls")
>       'obviously adjust this so that it points to the correct file
>    counter = 2
>       'this just will start the paste in wip.xls in row 2
> 
>    for each mySheet in Worksheets
>       mySheet.select
>       for i = 1 to Range("a1").currentRegion.rows.count
>          if cells(i,10).value = "Y" then
>                Range(cells(i,1),cells(i,9)).copy
>                Windows("wip.xls").activate
>                Cells(counter,1).pastespecial paste:=xlValues
>                application.cutcopymode = false
>                Windows("invoice.xls").activate
>                counter = counter + 1
>          end if
>       next i
>    next mySheet
> end sub
> 
> I have tested this to some extent. I hope that it helps you.  I haven't used 
> a checkbox, you can always adjust the code to handle that instead of a "Y".
> 
> Katie
> 
> "McKean" wrote:
> 
> > Hi Guys,
> > 
> > I tried looking fort his answer and I think it is answered in parts of other 
> > questions but I cant get it together.
> > 
> > Scenario:
> > 
> > I have a file called invoices.xls which is a workbook of 12 monthly 
> > worksheets for the year. Each item in a monthly worksheet is a row that 
> > houses project information financials etc (project cost, outsourced cost, 
> > project name etc)
> > 
> > We also have another file (wip.xls) where we double handle all of that 
> > information and cut and paste only those files that we are currently working 
> > on.
> > 
> > I would like wip.xls to be automatically populated with certain cells from 
> > invoice.xls
> > 
> > I would like to add a column into invoice.xls called 'WIP' and IF the cell 
> > contains a 'Y' (meaning we are currently working on it) it appears in the WIP 
> > document, If it does not contain a 'Y' then it is not included in the WIP 
> > document. (Even better if I put in a checkbox)
> > 
> > I have no idea how to do this. The other thing is, can I then go and add 
> > extra cells in each row in the WIP file without causing a problem. I would 
> > like to open WIP and add a column which holds what people are currently 
> > working on it, but I dont have this data in invoice.xls, nor do I want it in 
> > invoice.xls.
> > 
> > Any help would be appreciated.
> > 
> > McKean
0
McKean (2)
10/27/2004 10:59:02 PM
Reply:

Similar Artilces:

create a roster
How can you create a weekly roster in which functions can be assigned to more than 10 people. The roster should be updatable, so that when holidays and days off are marked on the weekly roster they will be taken account of it future rosters. ...

importing or creating reference footnotes
I am trying to import a word document into publisher and it has reference footnotes within the document. The reference footnotes are not coming into the publisher document with the reference footnotes. Correct, they will not up to Publisher 2003. In Publisher 2003 depending on which version of Word you are using if they will or not. -- "If you don't know where you are going, any road will take you there!" ...

Mailbox not created when AD account created
A couple of days ago I noticed that I created a user account but the 'Email Addresses' tab of the user properies did not list any email addresses. Subsequent new user accounts have all experienced the same. I researched the knowledge and tried the recommended solutions to either manaully start the recipient update service or rebuild te recipient update service. Neither recommendation has resulted in a mailbox being created for this particular user or any additional user that I have created since this error first showed up. I performed a Windows update last Thursday and so I bel...

Task Create - Status
I'm trying to make a simple task, when a user owner is assigned a task in CRM, it receives an email letting it know it has one. I have the following below, but it is not generating one when i assign one manually in the CRM. What to do? I've tried both the following: When task is created E-Mail to:[owner];Subject test As well as: When task is created if Task activity status = Open then E-Mail to:[owner];Subject test I've checked the mailserver many times over, and I can send emails manually from the CRM so you can rule that out Tested out ok on our end. Some ideas:...

In copied worksheet, embedded chart uses data fm orig
When I copy a worksheet, I want the embedded chart to automatically use data from the new worksheet, Instead, it uses data from the original worksheet. So I have to edit each data series in the chart everytime I create a new worksheet by copying an old one. Example: worksheet displaying hours worked that week. When I copy the sheet to start a new week, the embedded chart is displaying data from last week. It seems you are making the new worksheet with Copy & Paste. Try this instead: click on the tab of original sheet (let's call it Sheet1), hold the CTRL key down and drag the tab ...

Help Creating XmlNode / XmlAttribute Elegantly
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString" value="server=(local);" /> </appSettings> </configuration> I am using a XmlDocument for my base implementation. I am looking to see if there is a better way to add a new node / attribute than using XmlDocument.InnerXml. I would consider this to be a hack but couldn't really see another way of doing this without definin...

Create external database
Hi all. I need to create an external database (file). On a site I found this code: ------------------------------------------------------ Function CreateLinkedExternalTable(strTargetDB As String, strProviderString As String, strSourceTbl As String, strLinkTblName As String) As String 'strTargetDB = Source Database Name 'strProviderString = Not used, currently hard coded 'strSourceTbl = Source Table name in the database we are linking too. 'strLinkTblName = Table name we would like to see in the Access Database. Dim catDB As ADOX.Catalog Dim tblLink As...

Or, index, match statements
I have a workbook with 8 workheets. The first 7 worksheet are name Mon, Tues, Wed, Thur, Fri, Sat, Sun. These 7 contain the name my employees and whether they show up to work in text statement. They all look like these. Mon Worksheet A1 B1 Name Tom Jason not show up to work Susan not Show up to work Ryan Bill not Show up to work Notice that if any of my 5 employees show up to work, cell in column B is leaving blank Similarly for Tues A1 B1 Name Tom Jason not show up to work Susan not Show up to...

How to create pie chart with %
I have got a problem that I don't if excel could help me to calculate the % within a column and draw a pie chart. My case is I have a column containing a series of numbers. e.g. 1,4,8,1,3,9,11,2,4,5,6,.........etc I want to draw a pie chart that showing 1-3 , 4-6, 7-9, >9 with the corresponding % inside that column. Can anyone tell me how can I make it ? Ray - You need to calculate the frequencies in your data. Let's assume your data is in A1:A12. In B1:B3 enter these numbers, the upper limits on the groupings: 3 6 9 You can enter ">9" into B4 witho...

Email address not created when a new user is created
All, This issue recently happened in my company. Upon creating a new user, the policy was set to create the smtp and X400 address automaticaly. Now when we create a user the smtp and x400 addresses are not created, and when attempting to setup the new user in outlook, the address cant be found. We are using exchange 2003 SP1 on Win2k3 servers. On Wed, 13 Jul 2005 06:49:07 -0700, "Bryan" <Bryan@discussions.microsoft.com> wrote: >All, >This issue recently happened in my company. Upon creating a new user, the >policy was set to create the smtp and X400 addres...

550 5.7.1 error when others send email to us
We have Exchange 2003 and have two domains set up and they have been working fine for years. We recently added a third domain but senders to this domain get a "remote host said: 550 5.7.1. Unable to relay" when they send email to it. The new domain has been added under recipient policy and the mx records are correct. All our IT professionals have been scratching their heads over this one....please help! Go into your recipient policy and edit the new address. Make sure that the box is checked that states "This Exchange Organization is responsible for all mail deliver...

Exchange 2010 MRM, no log files being created
I'm hoping someone can help me with this issue....it has been driving me crazy for days. I have enabled MRM logging on our exchange server, and I can see that some of the policies are working when I run start-managedfolderassistant. We have a retention policy tag on the deleteditems folder, and this does work. The problem is I am not getting any files in the MRM log directory. C:\Program Files\Microsoft\Exchange Server\V14\Logging\Managed Folder Assistant Events 9021 and 9022 are logged in the Application log, but where are the files? Below is the output of my mai...

when form created
I have a form which was created by someone else (not a form template) which is like a questionnaire with empty boxes to be completed. When the boxes are typed in all the margins move to accommodate the words being typed. Is there a way to fix/lock the original form and then just fill in the blank boxes? I suspect this is set up as a table with auto resizing enabled. Displaying table gridlines (Table | Show Gridlines) will help you see what you're dealing with. Then select the table, go to the Table tab of Table Properties, click Options, and clear the check box for "A...

Creating a Brochure
How do you create a 3-column brochure from scratch for Publisher 2002? I can only find the directions for the 2003 version. Quick help would be appreciated, project is due Monday. Create a three-panel or four-panel folded publication http://office.microsoft.com/en-us/assistance/HP011646681033.aspx Scroll down to the section that says "Build a three-panel or four-panel publications from scratch." -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Derek" <Derek@discussions.microsoft.com> wrote in message news...

How to create Access macro shortcut
I'm still using Access 97 and saw something the other day that I would like to use that was in Access 2000. In an Access 2000 database, there was a .mam file in a directory that launched the Access 2000 program and ran a macro. How do you set this up? Can it be done in Access 97? If so, how? Hi. > How do you set this up? Select the macro in the Database Window and right click with your mouse, then select "Create Shortcut..." in the pop-up menu. Follow the prompts for where to place the shortcut and what to name it. The default is: <PathToDeskTopDir>\Shortcut ...

How do you print an Excel worksheet to show the rows and columns?
I'm new to Excel, and trying to print a document that will show the rows and columns, rather than just the information. How do I do this? In Excel 97 (later versions will, I assume, be similar) click File - Page Setup. Then select the "Sheet" tab and in the box labelled "Print" will be a checkbox labelled "Gridlines". Check that and print it. Peter "Michaelangelo" <Michaelangelo@discussions.microsoft.com> wrote in message news:A635EBC2-AB49-45D8-803D-5C2E91ACDDAC@microsoft.com... > I'm new to Excel, and trying to print a document th...

Users mailboxes not created when user created
I have a problem that recently just started happening on my exchange 2003 server. When i create a new user account and create the mailbox for exchange, once im done, the mailbox isnt created, adn if you go into the properties of the user account adn go to the exchange email address tab, there isnt an smtp or an x.400 address listed. I am having to manually create and add these, adn then go delete the exchange mailbox and recreate it. This is really annoying and would love to know if anyone has any ideas of how to fix it. Thanks Jason In news:9F836A43-98BF-435A-AA43-AFF10124BE3F@micro...

CRM should let me create custom fields in batch
Hi, With MS CRM v3.0, when we have a group of fields to create, it would be faster to be able to enter the list and then submit the list for processing. Thank you. Felix. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/C...

Creating an ad book
How do I divide a page into equal sections (halves, qarters, eights)? I need to scan and type ads and coupons into this booklet. New at this. After managing to set up OE-QuoteFix on his new PC, Ed reads a message from FRSH <anonymous@discussions.microsoft.com>... > How do I divide a page into equal sections (halves, qarters, eights)? Arrange > Layout Guides > Grid Guides -- Ed Bennett - MVP Microsoft Publisher http://www.mvps.org/the_nerd/ Before reading this message, view the disclaimer: http://mvps.org/the_nerd/disclaim.htm ...

Access unable to create an MDE
I am getting this message when I try to make an MDE: "Access unable to create an MDE database" No error mesages or any other info is displayed. I haven't had this trouble before. Then I added a form, a couple reports, an create table query, modified a toolbar and added a module. Now I am getting this message. This database is a front end of a project with several linked table to a back end. Any suggestions? Thanks Jeff G Try compiling your application (under the Debug menu when you're in the VB Editor). Often an application will have some error that doesn't m...

create a database from which bibliography an be created
How do I create a database from which a bibliography can be added to the end of a Word document? I used the program RefManager, but that is too expensive for me to update. Does Word 2003 have such a program? Thanks Not natively. Have you checked your academic institution? They might have campus licenses which students can use at home. You could give Zotero a spin (www.zotero.org). Personally, I don't like it, but that's just me. Word 2007 comes with referencing capabilities, but they are limited in functionality. Anything special you want, you would have to add i...

protecting a group of cells not a whole worksheet
I would like to protect a group of cells and not a whole worksheet but I haven't been able to figure out how to do this. I think this would be the best way for what I am wanting to do. I have a spreadsheet that I send to 13 people. They make changes and send back to me and then I have to up-date the changes. If I could protect all the cells except for the one they enter in - then I could save the file on a shared drive and it would eliminate me up-dating. Is there a way to do this? Hi select the cells for which you want to allow entries. After this goto 'Format - cells - Protection&...

Error creating activities from Cases
Hi I have an out of the box SBS 2003 CRM Setup I have installed Rollup1 and the new help files Under about MS CRM it has CRM 3.0 (3.0.5300.0) When we try and create activies from within a case, we get the following to errors in the event log We can create the activities just fromthe main web client menu ok The same thing happens in the outlook client (OL 2003, Exchange 2003) I found some links to verabose stuff, but they all applied to the have MS CRM setup on multiple server. We have tried it with and without Outlook open Anyhelp appreciated Event Type: Error Event Source: MSC...

double clicking icon no longer opens worksheet
Suddenly double clicking the file icon opens Excel with no worksheet and the data doesn't load (application has been used for over a year; failure to successfully open began about a week ago). We have Windows XP with Office XP. Word documents successfully open by double clicking the icon. Files can be opened using the Open command within Excel, but not through a file shortcut nor through Windows Explorer. Does anyone have any thoughts? If you are talking about a desktop icon. I just made another one by right click on desktop>new>shortcut>browse>to "C:\Program Files...

Create multiple owner fields?
Is it possibel to create multiple owner fields in a form. We need to track the users who is working with an account. I know only own owner field is supported, but is it poosible to have one owner field and custom fields using the lookup dialog to map more users? // Mats Have you looked at creating a custom entity. Then have a Many to One relationship to user and a Many to One relationship to Account. "Langer" wrote: > > > Is it possibel to create multiple owner fields in a form. We need to > track the users who is working with an account. I know only own o...