+ Reply to Thread
Results 1 to 11 of 11

Declare datatype

  1. #1
    Registered User
    Join Date
    08-05-2008
    Location
    UK
    Posts
    6

    Macros Programming

    Hi All

    I am defining a for loop and copying values from one worksheet to another.
    Matching field is e.g. 1,1.1,1.1.2 , 1.2,1.2.1.......
    whts happening is, after copying till 1.1.2 next value shoul dbe 1.2 but it goes back to the values of 1.1.2 instead of 1.2. is there any function available i could check this with?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Please read the Forum Rules & use the correct type of titles.

    If you want help I think you will need to add some more information, like your full code with the loop and possibly an example workbook
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-05-2008
    Location
    UK
    Posts
    6

    Copying data

    Hi.
    i have 2 files. one is source and the other one is target. i am trying to import data from source to target. can anybody suggest macro code to do that?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-05-2008
    Location
    UK
    Posts
    6

    Declare datatype

    I have got a field with values 1.1.1,1.1.2 and so on. i want to declare a variable to hold these values with 2 decimal points, wht shall i use?

  5. #5
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    Can you tell me how 1.1.1,1.1.2 translates to a number? What is it meant to represent? Double or Currency are the obvious choices for a number with 2 decimal places.

    Richard

  6. #6
    Registered User
    Join Date
    08-05-2008
    Location
    UK
    Posts
    6
    hi

    its just a value as in table index.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by Renu Rathor
    hi

    its just a value as in table index.
    It's still no clearer. What are the actual numbers?

    Also, can you respond to your previous question.

  8. #8
    Registered User
    Join Date
    08-05-2008
    Location
    UK
    Posts
    6
    I have attached 2 files. Source file from where data is coming and target where its going.
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Are you just wanting to do a straight copy & paste from the source.xls to the traget.xls? You don't need to hold the data in a variable in which case - you can just execute the copy eg:

    Please Login or Register  to view this content.
    Amend the workbook names, sheet names and ranges copied from/to for whatever is appropriate.

    Richard

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Renu Rathor

    You seem to have three threads on this subject!

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Threads merged.

    Renu, please stop opening new threads on the same topic.

    So far, no one has a clue what you're trying to do. Maybe you could take a deep breath and explain clearly.

+ 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