+ Reply to Thread
Results 1 to 4 of 4

Relating A Character To A Column or Row

  1. #1
    Registered User
    Join Date
    08-23-2013
    Location
    Albany
    MS-Off Ver
    Excel 2010
    Posts
    34

    Exclamation Relating A Character To A Column or Row

    Is there a way to have excel read the characters of a number and display a function for each? In my example I would like to be able to type a part number into a box and have it read; if character 1-3 is (value) then highlight this cell. Here is a example part number and spreed sheet. B123A48E12B012, Segmented -B123-A-48-E-12-B-012, so in this case I would like to tell excel to high light a certain cell depending on what each segment reads. So if segment 2 which is "A" = A highlight cell O57. In the example green is the end value and yellow determines how to get that.

    Attachment 261315

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Relating A Character To A Column or Row

    Can you define what each segmented section of the part number represents on your spreadsheet?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    08-23-2013
    Location
    Albany
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Relating A Character To A Column or Row

    So unfortunately I can't provide the actual example but here is a new number: B123A48E12B012, Segmented -B123-A-48-E-12-B-012. So again this part number is broken up to several segments, each segments brings you to a column in that spread sheet (I,II,III,IV,V,VI). with this new example I will break down each segment and have it shown with all false numbers loaded into the spread sheet. "B123" would define my worksheet that i'll be using (something you would visually see, doesn't need code). So then i look at my next segment "A" this will define my column "I", but you also need to know column IV to be able to get diameter 6,7,8. So i would then skip segments to find the value in my part code that goes with column IV which you will figure out from the small table at the bottom. In this case Column IV is defined by the part of the segment that is "12". so you would then go down column "IV" to "12" and follow then column "I" along the "A" row (both shown in yellow). And this will give you your diameter for 6,7,8 highlighted in green. Now we have to find Dia. 1-5 so we need to find column II and III. In this case after following the small table at the bottom we can see that II is the segment containing "48" and III is Segment containing "E" (shown in yellow). Now with these two you can find Dia. 1-5 (shown in green). And now your part dimensions are fully defined. So now we have matched your segments B123,1,48,E,12 and segments B and 012 I have left out of the table but would usually be another defining dimension. So what I want is a code that would say in this case: the first character through the 4th character will define your spread sheet, 5 character will define "I", 6th and 7th character will define "II", 8th character will define "III", 9th and 10th character will define "IV", 11th character will define "V", and 12th,13th and 14th character will define "VI". I would like to have this code run the example we just did instead of me having to manually go back and forth and follow the rows to define the dimensions of my part. I don't now anything about code really but for the first section we did to define Diameters 6-8 it would go something like this(again I don't know code); if character 9 and 10 equals column IV check that character 5 equals column I and then have it display those dimensions we highlighted in green. Hopefully this help, again I don't know a lot about this and I can't show the actual table so this makes it hard for me to explain. again thanks for the help and attached is new sheet.
    Last edited by smiz; 08-28-2013 at 10:07 AM.

  4. #4
    Registered User
    Join Date
    08-23-2013
    Location
    Albany
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Relating A Character To A Column or Row

    Also alot of the data has been removed all blank cells would usually have values in it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Relating A Character To A Column or Row
    By smiz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2013, 10:23 AM
  2. Replies: 3
    Last Post: 11-08-2012, 05:01 PM
  3. Need a column to populate from an array relating to a drop down value
    By AGrace in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-13-2010, 08:42 AM
  4. Returning Value in Column relating to MAX
    By 2709236 in forum Excel General
    Replies: 3
    Last Post: 03-19-2010, 05:01 PM
  5. [SOLVED] Adding values relating to another column
    By bugmenot in forum Excel General
    Replies: 4
    Last Post: 03-19-2009, 03:51 PM

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