+ Reply to Thread
Results 1 to 8 of 8

Vlookup to copy the color of text in cells

  1. #1
    Registered User
    Join Date
    06-16-2008
    Posts
    32

    Vlookup to copy the color of text in cells

    Ok, one more problem.

    I've a reasonably big database, which has different data in different colors. Originally database was in a way that a data was in groups of 4 rows; example
    A1 B1
    name owner
    street addr owner addr
    zip zip
    phone phone

    and so on.

    I used Vlookup to change the orientation or the database, so 1 row would always have ALL the information of 1 company (something like 150 columns).
    example

    A1 A2 A3
    name street addr zip

    and so on.

    Now the problem is, the colors...

    I'd somehow need to capture the color of the text in the original database and retain it in the one I create using Vlookup.

    I hope I was clear enough.

    E: Adding a vlookuppiece I have

    Formula = "=IF(VLOOKUP($A4+B$2,'KAIKKI TIEDOT'!$A:$BZ,B$1)="""","""",VLOOKUP($A4+B$2,'KAIKKI TIEDOT'!$A:$BZ,B$1))"

    That basically looks for whatever reads in the the cell in the 'kaikki tiedot' sheet and copies it to the current, and also check for empty cells so it does not copy them as zeroes, now I would have to add something for the color, preferably in the same formula.
    Last edited by gummi; 07-21-2008 at 11:54 PM.

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    macro

    Hi
    With a formula you can't copy colors. With macro it is possible. I could not follow how many rows change to columns and vice-versa. I can give you a solution if you tell me the layout of your sheet/s
    Ravi

  3. #3
    Registered User
    Join Date
    06-16-2008
    Posts
    32
    The database consists of increasing amount of clients, which each has 4 rows dedicated for them, and increasing amount of columns.

    Right now there's about 400 clients. They start from row 23.

    The amount of rows should not matter as it changes, depending on what changes the user makes in the database (adding new columns to the middle, and adding rows)

    The database I generate using Vlookup formula is right now something that is updated all the time and it has to stay like that, as I use it to search for companies and to generate reports.

    numbers just for clarifying:

    database (original)
    4 rows per company, n amount of columns, n amount of companies
    database (created)
    1 row per company. n *4 amount of columns, n amount of companies

    Thanks for your help.
    If you need more just ask.

    ::EDIT::

    I've been trying to find something from this page: http://www.cpearson.com/excel/colors.aspx but I'm not too proficient with macroes...

    I guess... if I made a loop which check through the database and then through the generated database and changes colors accordingly...

    But I've no idea how to make a macro, which would run without user running it ... as in having a button with macro assigned in it.

    ::MORE EDIT::

    Also, I can't use any external 'modules' or so. As this work will have to work on new computers with just normal excel (2003/2007) in it.
    Last edited by gummi; 07-22-2008 at 12:47 AM.

  4. #4
    Registered User
    Join Date
    06-16-2008
    Posts
    32
    Just bumping up and asking if I'd need to post some examples or something?

    I'll attach example on the companies.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    macro

    HI
    The sample you attached did not help in any way.It should have been more realistic. you could atleast have given some dummy name of companys. Try the attached macro.
    Ravi
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-16-2008
    Posts
    32
    Bump, any solutions?

  7. #7
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    macro

    Hi
    I had provided a macro solution to your problem. Did you try it?
    Ravi

  8. #8
    Registered User
    Join Date
    06-16-2008
    Posts
    32
    Ah thanks, for your reply. Sadly it aint exactly what I'm looking for. Sorry for late reply, I somehow managed to miss your reply last time.

    I'm having some problems with this forum, the topics arent updating or something.

    I'll try to make more realistic example, with the macros and everything. I'm just not allowed to use the real data, and it's quite a few cells to make up some company information

    I'll post something soon.

    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