+ Reply to Thread
Results 1 to 18 of 18

Help with a fan out

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Help with a fan out

    I had a macro with a fan out button that worked great. If Column "J" had yes in would look at column "D" and move that row to a sheet named with the value of "D". I need to change it to be column "N" that needs the yes value. I tried just changing all the "j's" to "N's" but that didnt work. I've attached a sample sheet that was working for when i needed yes in column "J". Any help would be appreciated.

    Code is on first sheet, the spreadsheet has a lot of sheets.
    Attached Files Attached Files
    Last edited by CityInspector; 02-06-2013 at 12:15 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,259

    Re: Help with a fan out

    Hello CityInspector,

    Currently, the header row covers columns "A" to "J". Does column "N" have a header also? My guess is that it doesn't but it does have data. Is that correct?
    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
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    The first sheet is blank and that is where the code is. The other sheets have data already inputted.
    Last edited by CityInspector; 02-05-2013 at 04:03 PM.

  4. #4
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    The first sheet is blank except for the fan out button. The other sheets have data inputted. I usually enter all the info on the first sheet then hit the fan out button and it moves the data from the first sheet to the other sheets based on the data in columnd "D".

  5. #5
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    any help with this??

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,941

    Re: Help with a fan out

    Please Login or Register  to view this content.
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    Leith,
    yes that is correct.

  8. #8
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    Ben,
    That didn't seem to work. But it may be in the because im trying to paste it in the original file and that somehow isnt working. Can you upload a file for me?

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,941

    Re: Help with a fan out

    original file attached:
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    Ben,
    I downloaded the file you uploaded. I erased all the data that was on the spreadsheet and then inputted data on the first sheet. When i hit the "fan out" button it didn't do anything. Any suggestions?

  11. #11
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,941

    Re: Help with a fan out

    Sorry, I don't know why it doesn't work on your end. Maybe you have some blank spaces in the Yes cells: Try this one, it trims the blanks, etc:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 02-08-2013 at 05:07 PM.

  12. #12
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    still not working. is there a way you could upload a the workbook that you got it to work with but with no data in it. Sorry for all the requests but i really appreciate the help.

  13. #13
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    I tried creating a new workbook and pasting in the code but I don't know how to create a "fan out" button.

  14. #14
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,941

    Re: Help with a fan out

    I don' know if you are manually adding each tab to the new workbook, so I added code to add a sheet for any Colunm D value that does not already have a sheet. I alseo included steps for adding a button to run the macro.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    I created the fan out button and assigned the macro. I inputted all the data on the first sheet and hit fan out. It created all the sheets based on column d but it copied row 1 to each sheet and that is it.

    I will attach a workbook to show you what happened. Currently the website is acting up and wont let me attach anything.
    Last edited by CityInspector; 02-12-2013 at 10:27 AM.

  16. #16
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    I managed to get it uploaded.
    Attached Files Attached Files

  17. #17
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,941

    Re: Help with a fan out

    I had assumed that your Yes/No column would have a header, so I included code to find the last column. Since you had not header for yes/no, the pointer was off by one. This time I have hard coded the yes/no column at #14 (N).
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    10-12-2012
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: Help with a fan out

    It works great. One issue is it opens up two work books. I saved it as "Cognos" so when i open it up it opens two workbooks named "cognos1" and "cognos2". Any idea why? And thanks again for all the help.

+ 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