101----102----103
201----202----203
301----302----303
401----402----403
I want the row number of value "202" within those 3 columns. Then i want the column number for that same value. If i do match(202,A1:C4,0) to get the row, it does not work.
101----102----103
201----202----203
301----302----303
401----402----403
I want the row number of value "202" within those 3 columns. Then i want the column number for that same value. If i do match(202,A1:C4,0) to get the row, it does not work.
The MATCH function only works with a single column (or row) at a time.
Is that really representative of your actual data? If so, you can find the row number using this:
=INT(202/100)
assuming the data starts in row 1, and the column number can be found with this:
=MOD(202,100)
assuming it starts in column A. In both cases the 202 could be replaced by a cell reference which holds the value of 202.
I suspect, though, that your real data is somewhat different, so please clarify.
Hope this helps.
Pete
my data looks like this:
Math-------102----103----104
English----404----405----EMPTY
Gym--------203----204----205
History----301----302----EMPTY
Im working on a schedule maker. What i need to do is find the course name corresponding to a number in the same row. For example if i am searching for 405 i want the function to return "English". The number are days+period starting from Monday. So for example 405 would be Thursday 5th period.
When i write down my schedule from that array it looks like this:
Monday---Tuesday---Wednesday---Thursday---Friday
1 X--------X---------?-----------X----------X
2 Math-----X---------?-----------X----------X
3 Math-----Gym-------X-----------X----------X
4 Math-----Gym-------X-----------English----X
5 X--------Gym-------X-----------English----X
If i want to know what course i have on Wednesday 1st and 2nd period (where the ? are)i would look for the course name corresponding to the row # where 301 and 302 are in the 1st array.
Okay, but it would help if you attached a sample Excel workbook, so anyone trying to help you does not have to type out your data again before trying out possible solutions.
To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't try to use the Paperclip icon, as this does not work on this forum.
Hope this helps.
Pete
Like this? In the upper array the ?? are Friday, 4th and 5th periods. To find the course thats supposed to be there i look in the second array the course name that is at 504-505
Last edited by Thormind; 04-06-2019 at 04:15 PM.
How do you know that Friday periods 4 and 5 contain either 504 or 505? Do you have another grid with the codes in which is then used to generate the grid with the subject names in?
Pete
Ah! I think I know what you mean now. Put this formula in cell B4:
=IF(COUNTIF($B$10:$D$13,COLUMNS($B:B)*100+$A4)=0,"",INDEX($A$10:$A$13,IFERROR(MATCH(COLUMNS($B:B)*100+$A4,$B$10:$B$13,0),0)+IFERROR(MATCH(COLUMNS($B:B)*100+$A4,$C$10:$C$13,0),0)+IFERROR(MATCH(COLUMNS($B:B)*100+$A4,$D$10:$D$13,0),0)))
Then you can copy this across and down your upper table (though it gives slightly different results than the names that you show).
Hope this helps.
Pete
Glad it worked for you.
If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.
Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of any post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).
Pete
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks