+ Reply to Thread
Results 1 to 3 of 3

Replace specific text in a formula not working vba

  1. #1
    Registered User
    Join Date
    11-30-2012
    Location
    alberta, canada
    MS-Off Ver
    Excel 2010
    Posts
    39

    Replace specific text in a formula not working vba

    Hello everyone,

    No matter how I have messed around with the code, it never seems to work 100%.

    Basically I have given the user a... well, userform to interact with to change how the program calculates order but it seems that it only seems to change part of the code in 1 direction.

    Things you should know before you look at the code

    - I let them select from 7 rows of 7 using optionbuttons.

    - I have named the optionbuttons as such:
    ob11, ob12, ob13, ob14, ob15, ob16, ob17
    ob21, ob22, ob23, ob24, ob25, ob26, ob27
    ...
    ob71, ob72, ob73, ob74, ob75, ob76, ob77

    - This is because I use 2 for loops (1 within the other) to get what I need.

    Now here is the code:

    Please Login or Register  to view this content.
    If you have any questions just let me know and I will do the best that I can to answer them (it may take until tomorrow if you reply after I leave the office)

    Have a great day,
    Sleepyshy

  2. #2
    Registered User
    Join Date
    11-30-2012
    Location
    alberta, canada
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Replace specific text in a formula not working vba

    Well... I posted something... thought it worked... but nope didn't fix it...
    Last edited by Sleepyshy; 01-08-2013 at 07:25 PM.

  3. #3
    Registered User
    Join Date
    11-30-2012
    Location
    alberta, canada
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Replace specific text in a formula not working vba

    Ok, so I found what was wrong. I just needed the cells that were being refenced to not be changed until after it changed all of the formulas or it would start changing the wrong stuff.

    Here is the new code:

    Please Login or Register  to view this content.
    I didn't need to separate the loops but it is fine; was easier to work with.

    If you have any questions let me know.
    Have a great day,
    Sleepyshy

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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