+ Reply to Thread
Results 1 to 6 of 6

variable in to input data into variable named sheet and if does not exist create

  1. #1
    Registered User
    Join Date
    07-29-2011
    Location
    Oxford, MS
    MS-Off Ver
    Excel 2007
    Posts
    7

    Post variable in to input data into variable named sheet and if does not exist create

    Kindergarden student here
    I am having difficulty in writing the code for:
    I have input on sheet1 A2(names) A4(date) A6(category) A8(amount). The important one is A2, selected from a dynamic range, I need to take A2 variable and check if a sheet is named A2(variable), if not then create sheet named A2(variable), or if true ,then import data from, A2,A4,A6,A8, to the next empty cell in sheet A2.
    I've attached the wookbook to make it easier to see what I am trying to do.

    I put excel back in the box, returned to the store, and accepted the fact that I am to dumb for it. Thanks anyway!
    Last edited by rwhidden; 08-13-2011 at 10:28 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: variable in to input data into variable named sheet and if does not exist create

    Hello rwhidden,

    Welcome to the Forum!

    When the data is copied to the other sheet will the cells A2, A4, A6, and A8 be in single column with no spaces?

    For example, say the data is copied to the new sheet starting with cell A2. Will the data on the new sheet then occupy cells A2:A5?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-29-2011
    Location
    Oxford, MS
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: variable in to input data into variable named sheet and if does not exist create

    Data will be in a row, A1, B1, C1, D1 .. with no spaces
    Thanks

  4. #4
    Registered User
    Join Date
    07-29-2011
    Location
    Oxford, MS
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: variable in to input data into variable named sheet and if does not exist create

    Quote Originally Posted by rwhidden View Post
    Data will be in a row, A1, B1, C1, D1 .. with no spaces
    Thanks
    I attached the wookbook, hopefully it will help!

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: variable in to input data into variable named sheet and if does not exist create

    Hello rwhidden,

    Okay, the workbook layout is quite a bit different. Can you explain to me what goes where now? I am assuming the Name will be used for the new sheet (if it doesn't exist). The other cells look like they go into cells C1:F1. Am I correct?

  6. #6
    Registered User
    Join Date
    07-29-2011
    Location
    Oxford, MS
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: variable in to input data into variable named sheet and if does not exist create

    Currently the input data goes to sheet "inputlog" , I'm trying to get the output to its respective sheet,ie. If Rick & Gail Whidden give $1.00 then the output would be place in the sheet "Rick& Gail Whidden".
    With the Input date, Name, Date given, category,amount in a row.
    The name does not need to go into the sheet. sorry. It is only used to create a new sheet and point to where the data should be stored.
    Last edited by rwhidden; 07-30-2011 at 12:14 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1