+ Reply to Thread
Results 1 to 4 of 4

Change cells value

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Change cells value

    Hi, I have many excel files that have similar structures. I want to change cells in column 10 to the specific values. For example, if it is 1, then change it as 337. If it is 2 then change it as 435. Anyway there is a text file to store the keys and values.

    The question is the user does not have the programming skills. She wants me to design a software to automatically change it because she has so many files, code in a single file is impractical.

    Thanks for your help and idea.
    Last edited by zhshqzyc; 02-18-2011 at 08:29 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,777

    Re: Change cells value

    You've described the concept of what you want to do so I can describe the concept of a solution.

    You can write VBA code in a single Excel file to do this. What is your level of knowledge about VBA?

    The code has to have some way of identifying which files to work on. The easiest way is to put them all in the same folder, and nothing else in that folder. You can use this code to iterate through them:
    Please Login or Register  to view this content.
    How many is "many" and how similar is "similar"? You haven't provided any information about data layout or how to do this mapping of keys and values, so I can't offer anything else.
    Last edited by 6StringJazzer; 02-17-2011 at 08:28 PM. Reason: modified code to add a folder path variable instead of just using the path where this workbook resides
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: Change cells value

    Please see the attached file for keys and values. I tried to use c sharp because of my poor knowledge on VBA.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-20-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    79

    Re: Change cells value

    So if I create such a file and VBA code inside it. How to run it? Just open the file?

+ 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