+ Reply to Thread
Results 1 to 15 of 15

Combining all With. that connected to same cells

  1. #1
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Combining all With. that connected to same cells

    Hi,

    I'm wondering if the below code can be put together for better coding. My code is getting longer.

    From:
    Please Login or Register  to view this content.
    To something like:
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Combining all With. that connected to same cells

    Hi,
    Try this :

    Please Login or Register  to view this content.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Combining all With. that connected to same cells

    Quote Originally Posted by GC Excel View Post
    Hi,
    Try this :

    Please Login or Register  to view this content.
    Does loop works in Sheet1 (a)?

  4. #4
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Combining all With. that connected to same cells

    Yes, it should..
    But impossible to say for sure without seeing the rest of the code.

  5. #5
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Combining all With. that connected to same cells

    It's good. Thanks.

    Still want to hear other alternative. Please keep the opinion sending in.

  6. #6
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Combining all With. that connected to same cells

    Quote Originally Posted by GC Excel View Post
    Yes, it should..
    But impossible to say for sure without seeing the rest of the code.
    I have For i = 1A to 4A but got error. One way is to change my code from 1A-4A to 4-8. Is it possible to replace the For part with something else?

  7. #7
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Combining all With. that connected to same cells

    You could try :

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Last edited by GC Excel; 07-15-2015 at 09:39 PM. Reason: missing code tags

  8. #8
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Combining all With. that connected to same cells

    Quote Originally Posted by GC Excel View Post
    You could try :

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Can this line (For i = 4 To 8) be changed so I can put 1A to 4A?

  9. #9
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Combining all With. that connected to same cells

    Can this line (For i = 4 To 8) be changed so I can put 1A to 4A?
    No, you can't.
    It like a counter, only numerical values are accepted (1, 2, 3, 4, 5, etc...). That's why you need to combine this variable (i) with a letter after

    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Combining all With. that connected to same cells

    Are you trying to adjust ALL charts? or just specific charts to 1A-4A and 5-8?

  11. #11
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Combining all With. that connected to same cells

    Loop for every chart on Activesheet
    put a IF statement in there if you want specific chart names

    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  12. #12
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Combining all With. that connected to same cells

    Quote Originally Posted by quekbc View Post
    Are you trying to adjust ALL charts? or just specific charts to 1A-4A and 5-8?
    There are two set of chart, Chart 1-4 and Chart 1A-4A

  13. #13
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Combining all With. that connected to same cells

    Please Login or Register  to view this content.
    Not working. Chart 1A-4A change to different size and no response to cell when change.
    Last edited by DavidRoger; 07-16-2015 at 01:21 AM.

  14. #14
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Combining all With. that connected to same cells

    Quote Originally Posted by humdingaling View Post
    Loop for every chart on Activesheet
    put a IF statement in there if you want specific chart names

    Please Login or Register  to view this content.
    Will you show me?

  15. #15
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Combining all With. that connected to same cells

    Quote Originally Posted by DavidRoger View Post
    Not working. Chart 1A-4A change to different size and no response to cell when change.
    After checking, I found that I didn't replace D100 to D101.
    It working now. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding Multiple Cells Not Connected
    By smarioncp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-17-2014, 10:32 AM
  2. [SOLVED] How to make Macro to lock certain cells connected to another cells value, then copy daily
    By RamiSaydi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2014, 12:41 PM
  3. 1 comment... connected to 3 cells
    By Xx7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2011, 03:15 PM
  4. Linking two cells already connected each other
    By stormmaker in forum Excel General
    Replies: 1
    Last Post: 11-10-2010, 05:58 AM
  5. formulas connected to empty cells
    By pippam in forum Excel General
    Replies: 1
    Last Post: 06-25-2008, 03:04 PM
  6. [SOLVED] Connected calculation of three cells
    By Pieman in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-06-2006, 09:10 AM
  7. how do you delete cells when they are connected with a formula
    By Rere in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 12-28-2005, 05:30 PM

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