+ Reply to Thread
Results 1 to 2 of 2

Formula in script not working

  1. #1
    Registered User
    Join Date
    08-14-2015
    Location
    HK
    MS-Off Ver
    2013
    Posts
    1

    Formula in script not working

    Dear All Exceliers,

    I have some code which I have trouble getting to work. It is for finding the value of the rightmost cell of each row. The "dd" variable is a string that is outputting column ranges as expected, but once it is place in as argument in the INDEX formula, it doesnt work. Can any kind soul help me out a little. Your help is greatly appreciated. Thanks, Andy!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Formula in script not working

    That's because you are actually typing the text value dd... you need to pass in the variable to build the string using ampersands & like this:


    Please Login or Register  to view this content.
    You appear to be using "+" where I would use a "&" ... so you may need to alter my code - but the idea is the same. The worksheet function INDEX() needs the Address the dd variable is storing - not the actual letter 'dd'



    Edit: Also - I don't know what you are doing with the DD in the 'column' parameter. I don't believe that will work.

    Wouldn't you just want this?
    Please Login or Register  to view this content.
    Last edited by GeneralDisarray; 08-14-2015 at 09:37 AM.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

+ 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. [SOLVED] 'Insert New Row' VBA script working in one sheet, but not another
    By shaunguyver in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-24-2015, 06:10 AM
  2. VB script not working
    By ssschaar in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-04-2014, 03:28 PM
  3. Script not working Error13 Please help
    By archangel9999 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2014, 10:55 AM
  4. This script isn't working, why not?
    By ledworld in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2013, 06:04 PM
  5. [SOLVED] VBA Script has stopped working
    By Philfy in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-10-2013, 11:24 AM
  6. [SOLVED] my if-then-else script is not working
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-01-2013, 02:24 AM
  7. Need vba script to look a worksheet and keep autofilter working
    By alinda in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2011, 03:32 AM

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