Extracting data from text

North for Short

Board Regular
Joined
Nov 17, 2010
Messages
61
I have a Spreadsheet which I have linked to other sheets effectively, (thanks to this board). I now want to go one step further and be able to write in a name in a column and within the same column, return a number (in this case a duty no.) I have tried Vlookup, if and match and so far, I have drawn a blank on obtaining the correct information. Is there anyway that this can be done? I have pasted a small extract with ficticious names. What I want is to know what route Jack Sparrow is doing on tuesday. I will leave it with you guys. If this has been done before, can someone point me in the right direction?

[TABLE="width: 793"]
<colgroup><col><col><col><col span="6"></colgroup><tbody>[TR]
[TD]duty[/TD]
[TD]Duty Holder[/TD]
[TD]Payroll[/TD]
[TD]MONDAY[/TD]
[TD]TUESDAY[/TD]
[TD]WEDNESDAY[/TD]
[TD]THURSDAY[/TD]
[TD]FRIDAY[/TD]
[TD]SATURDAY[/TD]
[/TR]
[TR]
[TD]route 1[/TD]
[TD]Casey Jones[/TD]
[TD]1001[/TD]
[TD]Jack Sparrow[/TD]
[TD]Casey Jones[/TD]
[TD]Casey Jones[/TD]
[TD]Casey Jones[/TD]
[TD]Casey Jones[/TD]
[TD]Casey Jones[/TD]
[/TR]
[TR]
[TD]route 2[/TD]
[TD]Robin Hood[/TD]
[TD]1002[/TD]
[TD]Robin Hood[/TD]
[TD]Jack Sparrow[/TD]
[TD]Robin Hood[/TD]
[TD]Robin Hood[/TD]
[TD]Robin Hood[/TD]
[TD]Robin Hood[/TD]
[/TR]
[TR]
[TD]route 3[/TD]
[TD]Benny Hill[/TD]
[TD]1003[/TD]
[TD]Benny Hill[/TD]
[TD]Benny Hill[/TD]
[TD]Jack Sparrow[/TD]
[TD]Benny Hill[/TD]
[TD]Benny Hill[/TD]
[TD]Benny Hill[/TD]
[/TR]
[TR]
[TD]route 4[/TD]
[TD]Mary Shelley[/TD]
[TD]1004[/TD]
[TD]Mary Shelley[/TD]
[TD]Mary Shelley[/TD]
[TD]Mary Shelley[/TD]
[TD]Mary Shelley[/TD]
[TD]Jack Sparrow[/TD]
[TD]Mary Shelley[/TD]
[/TR]
[TR]
[TD]route 5[/TD]
[TD]Henry Morgan[/TD]
[TD]1005[/TD]
[TD]Henry Morgan[/TD]
[TD]Henry Morgan[/TD]
[TD]Henry Morgan[/TD]
[TD]Henry Morgan[/TD]
[TD]Henry Morgan[/TD]
[TD]Jack Sparrow[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Reserve[/TD]
[TD]Payroll[/TD]
[TD]MONDAY[/TD]
[TD]TUESDAY[/TD]
[TD]WEDNESDAY[/TD]
[TD]THURSDAY[/TD]
[TD]FRIDAY[/TD]
[TD]SATURDAY[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Jack Sparrow[/TD]
[TD]1006[/TD]
[TD]route 1[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]day off[/TD]
[TD]?[/TD]
[TD]?
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Is this, copied across, what you want. If not, some more explanation and expected results please.

Excel Workbook
ABCDEFGHI
1dutyDuty HolderPayrollMONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAY
2route 1Casey Jones1001Jack SparrowCasey JonesCasey JonesCasey JonesCasey JonesCasey Jones
3route 2Robin Hood1002Robin HoodJack SparrowRobin HoodRobin HoodRobin HoodRobin Hood
4route 3Benny Hill1003Benny HillBenny HillJack SparrowBenny HillBenny HillBenny Hill
5route 4Mary Shelley1004Mary ShelleyMary ShelleyMary ShelleyMary ShelleyJack SparrowMary Shelley
6route 5Henry Morgan1005Henry MorganHenry MorganHenry MorganHenry MorganHenry MorganJack Sparrow
7
8
9ReservePayrollMONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAY
10Jack Sparrow1006route 1route 2route 3day offroute 4route 5
Which Route
 
Upvote 0
Solution
Jack Sparrow is a reserve person and I want to know what duty (route) he will be performing. So the top table contains the duty holders and where Jack sparrow is, the reserve pool. (There are 10 names). So, if I write in against Casey Jones in the top table, I want expecting a numerical value in the bottom table. So where I put a question Mark in on the tuesday, I know it is going to be route 2 but instead of writing it in, I want the formula to do it for me. Does this help? (the last formula only returned data that stated day off).
 
Upvote 0
So where I put a question Mark in on the tuesday, I know it is going to be route 2 but instead of writing it in, I want the formula to do it for me. Does this help?
I'm not sure I am understanding what you have said. For me the formula is returning "route 2" for Tuesday. I entered the formula shown in D10 of my layout and copied it across to I10. The values shown in my screen shot for D10:I10 were all produced by that formula.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top