+ Reply to Thread
Results 1 to 24 of 24

labeling rows

  1. #1
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    labeling rows

    I have a spreadsheet that has every number from 000-999. Each number has specific criteria related to it on each number's respective row. It will be an immense challenge to create formulas for every piece of info pertaining to each number. Is there a way to program a code or script for each number and its related content?
    Last edited by Jordans121; 06-03-2010 at 07:11 PM.

  2. #2
    Registered User
    Join Date
    08-29-2007
    Posts
    47

    Re: labeling rows

    Sounds like a simple IF formula or a VLOOKUP. We need a little more information though. What type of criteria? How many criteria elements needs to be considered? How are the codes determined?

    These don't need to be the exact criteria you're using, but some sort of example so we get an idea.

  3. #3
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    Seriously, there are about 40 columns of criteria related to each number.

  4. #4
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    Its kinda like copying and pasting the entire row. instead i want to label each row (000-999) so it takes all info in that row and compares it to another row

  5. #5
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    do you need a sheet to see what I'm talkin about?

  6. #6
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    I want to use VLOOKUP but on one column that will in-turn past the entire content/criteria of a number if it matches

  7. #7
    Registered User
    Join Date
    08-29-2007
    Posts
    47

    Re: labeling rows

    Yes - sheet please. It's very clear what the criteria is being used for. You have a set of data that, based off of this huge list of criteria, you want to assign it a numerical code? Or, once you assign it a numerical code, you want it to find a way to show the columns next to that specific code?
    Last edited by werfnort; 06-02-2010 at 06:28 PM.

  8. #8
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    heres the sheet I'm working on from another sheet. Take a look.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-29-2007
    Posts
    47

    Re: labeling rows

    Ok - but what is your goal? What are you trying to do? What do you envision a script doing?

  10. #10
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    I want to apply the results shown on the sheet to every other state that has Pick 3. I have the history of numbers for every state but I will take entirely too long (..month) to copy and paste every single number. I sorted them ascending but after I finish implementing the criteria i can sort them back to its original way by the date
    Last edited by Jordans121; 06-02-2010 at 06:44 PM.

  11. #11
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    The sheet you viewed is specifically for North Car. but I have a master sheet that literally has every number (000-999)

  12. #12
    Registered User
    Join Date
    08-29-2007
    Posts
    47

    Re: labeling rows

    Ok - so you want to say - if this cell is "782" - go to the master sheet, find 782, and copy all the information from that row into this row?

  13. #13
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    Exactly what I'm lookin' for.

  14. #14
    Registered User
    Join Date
    08-29-2007
    Posts
    47

    Re: labeling rows

    Ok - it might make sense to use a macro for something like this, especially if you're hoping to keep the cells colored in the same way.

    What about columns A & B? Should those be copied over too?

    What about the Date column? I'm guessing those won't be copied from the Master file.

  15. #15
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    The Master file is identical to the State files in terms of the columns and separation. As I mentioned before, i can copy and paste from the master file directly into the state file, once I finished I just simply paste the dates back in a column and sort them using the date which will put them back in order (most recent to last). Yes I want to keep the cells colored. Column A signifies whether the number is a Triple (T), a double (D) or a single (X) number. Column B was used to sort the numbers from low to high.

  16. #16
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    I want to make it clear that the dates column can be overwritten because I can replace them.

  17. #17
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    Also, the sheet does not look like this in Open Office Calc (groups), I guess some things did not convert when I saved in xls format.

  18. #18
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    dont worry about the date column because I will insert those last for sorting

  19. #19
    Registered User
    Join Date
    08-29-2007
    Posts
    47

    Re: labeling rows

    Ok here's the code I came up with. It's a little sloppy, but it works for me. Assuming that I have a "Master" sheet with the numbers 001-999, and that I'm starting with a sheet that has a list of numbers somewhere within that range (1,245,628,901,etc..) - This should work.

    Please Login or Register  to view this content.
    You'll have to adjust if the Master file is named something different or in a different sheet. If you're not using Excel, I'm afraid I can't be much help there.

    Good luck!

  20. #20
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    I'm unsure how to apply and run this macro

  21. #21
    Registered User
    Join Date
    08-29-2007
    Posts
    47

    Re: labeling rows

    To add a Macro in Excel, you'll need to open the built-in VBA Editor.

    1. Open Excel. Open the file you want to add the macro too.
    2. Hit CTRL + ALT + F11
    3. This will bring up the VBA Editor window, hopefully with a pane down the left side.
    4. You should see the filename for the file you're currently working.
    5. Right-Click on that filename and select "Insert Module"
    6. Paste the code about into that module.
    7. You'll need to make adjustments to the code based off of your worksheets. Without providing specific information, it's hard to give a specific answer.

    You can see that it will start in the cell A1 and work its way down. If you need to change the column where the picks are located, just change the Letter for Col="A".

    Then it uses the Match formula to look up A1, A2, A3, etc.. from the "Master" sheet you mentioned. You can see where Master.xls is located in the code. Change that to be the name of your master workbook. If the information is not in Sheet1, change that. If the numbers 001-999 are not located in a1:a999, adjust that, but make sure to keep it as B1 or C1, etc.. and just change the last part to B1000 or C1001. Whatever you need.

    8. Now that you're updated, go back out to Excel. Probably the easiest way to run this is to go back to your spreadsheet, North Carolina or whatever. Save a backup. Click at the very top of the Pick list. Go to TOOLS: MACROS: Select MatchPick3, and click Run.
    9. Double check to make sure it did what you wanted. Compare it to the backup.

  22. #22
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    The macro seemed to have perfomed as expected but the colors are drastically different. Any reason why?

  23. #23
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    I changed the sheet from xls to xlsx and now I'm getting an arrow next to "Sub MatchPick3()"

  24. #24
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: labeling rows

    Ok I had to modify the colors to fit within excel. Thanks a million werfnort!!!!

+ 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