+ Reply to Thread
Results 1 to 12 of 12

substituting a series of number by charachters

  1. #1
    Registered User
    Join Date
    06-19-2014
    Location
    Berlin
    MS-Off Ver
    office 2010
    Posts
    5

    substituting a series of number by charachters

    Hi everyone,

    I have a variable number ranging between 0 and 127 in box E2 of my spreadsheet. I want to interpret that value in box E1 according to the following table:
    http://andymurkin.files.wordpress.co...e-no-chart.jpg

    For instance, 0 in E2 should show C-1 in box E1, 1 should be C#-1, 2 should be D-1 and so on.
    Anyone has an idea how I can do this ? I am quite a beginner so the more simple the better...

    Cheers!
    Pierre

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: substituting a series of number by charachters

    Why does everyone insist on posting pictures instead of actual spreadsheets?

    I can't read that picture since I'm at work, but I know I could have downloaded a spreadsheet had you done so.

    Looks like a VLOOKUP would help.
    Is this musci related (I don't know cos I can;t download the picture)?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,737

    Re: substituting a series of number by charachters

    cant see the table - but it would be better to attach the spreadsheet here

    you maybe able to use vlookup or index match to lookup the value and get the corresponding value and put it into the next cell
    BUT if you want to replace the actual value in the cell - ie change 1 to C#-1 then it would need a macro/vba program
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    06-19-2014
    Location
    Berlin
    MS-Off Ver
    office 2010
    Posts
    5

    Re: substituting a series of number by charachters

    yes it is music related: i put a sound frequency in box B2, it gives me the closest not in MIDI Note Number convention in box E2 (plus offset in cents in E3) and I would like to read the "musical" note name in box E1

    The chart shows which MIDI note number correspond to which musical note.

    So far, I had success with "substitute, even if it would be a bit heavy to do the whole 127 values. But I ran into trouble for numbers above 9: 10 is detected as 1 and 0...

    I'll check Vlookup, let me know if anything better comes to mind ?
    Last edited by pierrer; 06-20-2014 at 08:43 AM.

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,737

    Re: substituting a series of number by charachters

    you have 8.7 in b2
    wheres the table to lookup the value 8.7 ?

  6. #6
    Registered User
    Join Date
    06-19-2014
    Location
    Berlin
    MS-Off Ver
    office 2010
    Posts
    5

    Re: substituting a series of number by charachters

    You should enter - manually - a number value in B2, anything between,say, 8 and 5000 or something like that.
    Then the desired calculation is done and gives me, amongst other things, an integer value between 0 and 127 in E2.

    It is this value that I want to translate into combinations of letters (A to G) and numbers, that represent the note and octave - you should see a couple of pictures on the spreadsheet, one of which is a table giving a letter and number for all values between 0 and 127. Not sure if my explanations make sense to you ?

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,737

    Re: substituting a series of number by charachters

    as you need to make a table from that image
    you may as well create a linear list rather than a grid

    0 to 127 in column A

    and the corresponding letter/number in column B
    and then vlookup would work fine

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: substituting a series of number by charachters

    Entia non sunt multiplicanda sine necessitate

  9. #9
    Registered User
    Join Date
    06-19-2014
    Location
    Berlin
    MS-Off Ver
    office 2010
    Posts
    5

    Re: substituting a series of number by charachters

    thanks shg for the formula, it works very well!
    Last edited by pierrer; 06-20-2014 at 08:46 AM.

  10. #10
    Registered User
    Join Date
    06-19-2014
    Location
    Berlin
    MS-Off Ver
    office 2010
    Posts
    5

    Re: substituting a series of number by charachters

    that s all working perfectly now thanks!

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: substituting a series of number by charachters

    You're welcome.

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: substituting a series of number by charachters

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. [SOLVED] Create number series based on another number series
    By hbangalore in forum Excel General
    Replies: 8
    Last Post: 04-05-2012, 01:22 PM
  2. delete certain charachters
    By khalid79m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2008, 10:51 AM
  3. Deleting Charachters after certain Character
    By Editz in forum Excel General
    Replies: 2
    Last Post: 11-09-2006, 12:18 PM
  4. Number of Charachters in a cell
    By Darin Kramer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2005, 06:06 AM
  5. [SOLVED] reduce # of charachters in same cell
    By mortym in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-20-2005, 12:06 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