Please help with formula

Andries

Board Regular
Joined
Feb 3, 2011
Messages
127
Hi

Please help me with a formula. I have two tables...the lookup data is in the first table (colums A,B and C...this data is obviously only a small part of the actual data)

Excel Workbook
ABC
2BLOCK/ROW/SEATSUBJECT CODEO/B
3w2-81-1MNP20YT*
4w2-81-2MNP20YT*
5w2-81-3PTL311T*
6w2-81-4PTL311T*
7w2-81-5AMF40AT*
8w2-81-6BMN23BD*
9w2-81-7DLM501TO/B
10w2-81-8DLM501TO/B
11w2-81-9DLM501TO/B
12w2-81-10DLM501TO/B
13w2-82-1DLM501TO/B
14w2-82-2DLM501TO/B
15w2-82-3DLM501TO/B
16w2-82-4DLM501TO/B
17w2-82-5DLM501TO/B
18w2-82-6DLM501TO/B
19w2-82-7DLM501TO/B
20w2-82-8DLM501TO/B
21w2-82-9DLM501TO/B
22w2-82-10DLM501TO/B
23w2-83-1DLM501TO/B
24w2-83-2DLM501TO/B
25w2-83-3DLM501TO/B
26w2-83-4DLM501TO/B
27w2-83-5DLM501TO/B
28w2-83-6DLM501TO/B
29w2-83-7DLM501TO/B
30w2-83-8DLM501TO/B
31w2-83-9DLM501TO/B
32w2-83-10DLM501TO/B
data2



The second table must have the lookup formula to return the subject code in Column I and K and M. The problem that I have is if the subject code has an "O/B" next to it in Column C it must start in a new block

Excel Workbook
HIJKLM
2BLOCK/ROW/SEATSUBJECT CODEBLOCK/ROW/SEATSUBJECT CODEBLOCK/ROW/SEATSUBJECT CODE
3w2-81-1*w2-82-1*w2-83-1*
4w2-81-2*w2-82-2*w2-83-2*
5w2-81-3*w2-82-3*w2-83-3*
6w2-81-4*w2-82-4*w2-83-4*
7w2-81-5*w2-82-5*w2-83-5*
8w2-81-6*w2-82-6*w2-83-6*
9w2-81-7*w2-82-7*w2-83-7*
10w2-81-8*w2-82-8*w2-83-8*
11w2-81-9*w2-82-9*w2-83-9*
12w2-81-10*w2-82-10*w2-83-10*
data2



Please look at the last table...it must be populated like this


Excel Workbook
HIJKLM
14BLOCK/ROW/SEATSUBJECT CODEBLOCK/ROW/SEATSUBJECT CODEBLOCK/ROW/SEATSUBJECT CODE
15w2-81-1MNP20YTw2-82-1DLM501T - O/Bw2-83-1DLM501T - O/B
16w2-81-2MNP20YTw2-82-2DLM501T - O/Bw2-83-2DLM501T - O/B
17w2-81-3PTL311Tw2-82-3DLM501T - O/Bw2-83-3DLM501T - O/B
18w2-81-4PTL311Tw2-82-4DLM501T - O/Bw2-83-4DLM501T - O/B
19w2-81-5AMF40ATw2-82-5DLM501T - O/Bw2-83-5DLM501T - O/B
20w2-81-6BMN23BDw2-82-6DLM501T - O/Bw2-83-6DLM501T - O/B
21w2-81-7*w2-82-7DLM501T - O/Bw2-83-7DLM501T - O/B
22w2-81-8*w2-82-8DLM501T - O/Bw2-83-8DLM501T - O/B
23w2-81-9*w2-82-9DLM501T - O/Bw2-83-9DLM501T - O/B
24w2-81-10*w2-82-10DLM501T - O/Bw2-83-10DLM501T - O/B
data2


It is currently looking like this which is not correct and it must look like the above table

Excel Workbook
HIJKLM
14BLOCK/ROW/SEATSUBJECT CODEBLOCK/ROW/SEATSUBJECT CODEBLOCK/ROW/SEATSUBJECT CODE
15w2-81-1MNP20YTw2-82-1DLM501T - O/Bw2-83-1DLM501T - O/B
16w2-81-2MNP20YTw2-82-2DLM501T - O/Bw2-83-2DLM501T - O/B
17w2-81-3PTL311Tw2-82-3DLM501T - O/Bw2-83-3DLM501T - O/B
18w2-81-4PTL311Tw2-82-4DLM501T - O/Bw2-83-4DLM501T - O/B
19w2-81-5AMF40ATw2-82-5DLM501T - O/Bw2-83-5DLM501T - O/B
20w2-81-6BMN23BDw2-82-6DLM501T - O/Bw2-83-6DLM501T - O/B
21w2-81-7DLM501T - O/Bw2-82-7DLM501T - O/Bw2-83-7DLM501T - O/B
22w2-81-8DLM501T - O/Bw2-82-8DLM501T - O/Bw2-83-8DLM501T - O/B
23w2-81-9DLM501T - O/Bw2-82-9DLM501T - O/Bw2-83-9DLM501T - O/B
24w2-81-10DLM501T - O/Bw2-82-10DLM501T - O/Bw2-83-10DLM501T - O/B
data2


Thank you in advance
Dries
 
Hi Peter

But what about the values in Cell B9 - B12? the function skips it and it is supose to carry on with returning the values after it "Skipped" the 4 cells?
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
But what about the values in Cell B9 - B12? the function skips it and it is supose to carry on with returning the values after it "Skipped" the 4 cells?
So..
(If not please make up some new dummy data that has all different values down column B so we can see exactly where they are turning up in column F)
 
Upvote 0
Ok lets try it like this...I think you will now see what the problem is

Excel Workbook
ABCDEFG
2BLOCK/ROW/SEATSUBJECT CODESTATUSBLOCK/ROW/SEATSUBJECT CODESTATUS
3w2-81-1MNP20YTw2-81-1MNP20YT
4w2-81-2MNP20YTw2-81-2MNP20YT
5w2-81-3PTL311Tw2-81-3PTL311T
6w2-81-4PTL311Tw2-81-4PTL311T
7w2-81-5AMF40ATw2-81-5AMF40AT
8w2-81-6BMN23BDw2-81-6BMN23BD
9w2-81-7AO/Bw2-81-7 
10w2-81-8BO/Bw2-81-8 
11w2-81-9CO/Bw2-81-9 
12w2-81-10DO/Bw2-81-10 
13w2-82-1EO/Bw2-82-1EO/B
14w2-82-2FO/Bw2-82-2FO/B
15w2-82-3GO/Bw2-82-3GO/B
16w2-82-4HO/Bw2-82-4HO/B
17w2-82-5IO/Bw2-82-5IO/B
18w2-82-6JO/Bw2-82-6JO/B
19w2-82-7KO/Bw2-82-7KO/B
20w2-82-8LO/Bw2-82-8LO/B
21w2-82-9MO/Bw2-82-9MO/B
22w2-82-10NO/Bw2-82-10NO/B
23w2-83-1w2-83-10O/B
24w2-83-2w2-83-20O/B
25w2-83-3w2-83-30O/B
26w2-83-4w2-83-40O/B
data2
 
Upvote 0
Ok lets try it like this...I think you will now see what the problem is
1. Is this the result you do want, or the result you don't want?

- If it is the result you do want then great, we are finished. :)

- If it is the result you don't want, please post the result you do want. :sad:

2. Did you see my Excel jeanie tip at the bottom of post #4? :eeek:
 
Upvote 0
Ok this not what I am looking for. What about the values A-D in cells B9 - B12...the function needs to continue ....meaning that in column F13 should not start at the value E but from A B C ....

I appreciate you helping me

Dries
 
Upvote 0
Hi Peter

Thank you for your help...I will repost my question...and yes I have seen your tip

Have a nice day
 
Upvote 0
Hi anybody

Is there somebody that can assist me. Please look at the previous postings to familiarize yourself
 
Upvote 0
Is there somebody that can assist me.
I believe that I can but you still haven't posted the results that you do want for that new data with A, B, C etc in column B (post #13).

You may not be able to do it with a formula (after all that is what you are asking for help with) but can't you just manually type the results you want in to column F and post the screen shot?
 
Upvote 0
Hi Peter

It must look like TABLE 2

Excel Workbook
ABCDEFG
1TABLE 1TABLE 2
2w2-81-1Aw2-81-1A
3w2-81-2Bw2-81-2B
4w2-81-3Cw2-81-3C
5w2-81-4Dw2-81-4D
6w2-81-5Ew2-81-5E
7w2-81-6Fw2-81-6F
8w2-81-7GO/Bw2-81-7
9w2-81-8HO/Bw2-81-8
10w2-81-9IO/Bw2-81-9
11w2-81-10JO/Bw2-81-10
12w2-82-1KO/Bw2-82-1GO/B
13w2-82-2LO/Bw2-82-2HO/B
14w2-82-3MO/Bw2-82-3IO/B
15w2-82-4NO/Bw2-82-4JO/B
16w2-82-5OO/Bw2-82-5KO/B
17w2-82-6PO/Bw2-82-6LO/B
18w2-82-7QO/Bw2-82-7MO/B
19w2-82-8RO/Bw2-82-8NO/B
20w2-82-9SO/Bw2-82-9OO/B
21w2-82-10TO/Bw2-82-10PO/B
22w2-83-1Uw2-83-1QO/B
23w2-83-2Vw2-83-2RO/B
24w2-83-3Ww2-83-3SO/B
25w2-83-4w2-83-4TO/B
26w2-83-5w2-83-5U
27w2-83-6w2-83-6V
28w2-83-7w2-83-7W
29w2-83-8w2-83-8
30w2-83-9w2-83-9
31w2-83-10w2-83-10
data2
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

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