+ Reply to Thread
Results 1 to 3 of 3

Cells concate rpoblem

  1. #1
    Registered User
    Join Date
    05-08-2007
    Posts
    6

    Cells concate rpoblem

    I'm trying to use the formula as follow:
    dim prev as integer
    dim cur as integer
    dim from as integer
    dim str as integer
    dim sprev as string
    dim scur as string

    prev=val(txtFrom.text) 'parse for a value in the text box say =2
    cur=prev+1 'is equal to 3
    sprev="A" & prev 'gives A2
    Scurr="A" & cur 'cur gives A3
    'This is what i' intending to do with those values in order to replace equation(1) with equation(2)

    Please Login or Register  to view this content.
    formula (equation(2)) gives error in excel cells (#Name? in the cells)
    My intention is to allow the user to enter the range and the macro could do the rest...
    Can any one help...
    I'll appreciate.
    Thanks
    Last edited by keleistein; 05-23-2007 at 01:26 AM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    You need to deal with your variables outside of quotes as follows:

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    05-08-2007
    Posts
    6

    Thanks

    Thanks alot.
    That will save me time and GUI space...After head scratching, i ended up creating a textbox and change my code as follow:
    s=txtRange.text 'i.e. expected text A3-A2
    form="=K2+1/(4096*(" & s & "))"
    Range(;;.formula=form
    That works fine but with extra cost...
    I'll definetly change it to urs now

    Thanks

+ 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