+ Reply to Thread
Results 1 to 5 of 5

Output to a specific cell in another workbook based on a value in a column

  1. #1
    Registered User
    Join Date
    10-17-2012
    Location
    Denver
    MS-Off Ver
    Excel 2010
    Posts
    5

    Output to a specific cell in another workbook based on a value in a column

    Hello -

    I am trying to figure out how to read a range from each worksheet in one workbook, check for a condition (IF the value = 1) and THEN input an associated value based on that information into a range("D11:D1000") of cells in another workbook, on the second worksheet.

    Here's the code I'm working with so far...
    Please Login or Register  to view this content.
    Moderator's Note: You have to put code tags around your codes, I've done it for you for now.
    Last edited by vlady; 10-17-2012 at 10:29 PM. Reason: You have to put code tags.

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Output to a specific cell in another workbook based on a value in a column

    D1:D1000.Value = 1 <---this kind of does make the whole range 111111111
    What do you want entered in the D1:D1000 range? equal to the F1 range in the ws's?

  3. #3
    Registered User
    Join Date
    10-17-2012
    Location
    Denver
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Output to a specific cell in another workbook based on a value in a column

    I actually want the output to be based on what's in the F range, but I plan to do this for several column ranges (ie. G, H, I and J will follow), all of which will be marked with a "1" in the original workbook, but the output will be different (ie. 1, .9, .67, .5, .1) depending on which column is marked (ie. column F = 1, column G = .9, column H = .5 etc). In the case of the F range, the output will be 1, which happens to be the same as the entry in this case.

    My goal is to have any columns marked in the F range show up in the new workbook in that same order (if its the third cell in the F range, I want it to be in the 3 cell of the destination range). However, when the sub moves to the next column, the G range, I want it to output to that same destination range in the new workbook, and also output in the same order that it is read. This way, since only one column in marked in each row (of the original workbook), after looping through each column, I should end with a single output column on the new workbook that is completely filled in.

    Hope this is the clarification you were looking for! I appreciate the help.

  4. #4
    Registered User
    Join Date
    10-17-2012
    Location
    Denver
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Output to a specific cell in another workbook based on a value in a column

    Potentially - should this be solved with an array sub that reads through all columns on the original workbook (Columns F, G, H, I and J; Range(5:1005)) and outputs a value to a single column in the new workbook, maintaining the order in which the cells were read on the original workbook? Any help with specific coding that I can just sub in file names to make it work would be amazing!!!

  5. #5
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Output to a specific cell in another workbook based on a value in a column

    Could you upload a before and after situation?

+ 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