Is it vlookup or if function or macro?

potter007

New Member
Joined
Aug 15, 2006
Messages
31
I'm trying to get a resulting answer but don't know which formula I need to use, from the data below, can anyone help?

Columns 1 and 2 is data that corresponds to each other and is sorted correctly.

Column 3 relates to columns 1 and 2 but I need to sort it against these columns by using the data in columns 4 and 5. I will also need blank rows putting in where data in column 3 is more than 1 of the same number.

Can this be done?


33300004 1 0046-0000UK-02 33300001 3C16670A
33300015 1 0327-00001U-04 33300002 3C16670A-UK
33300035 1 0407-GEDC00-01 33300003 3C16671
33300041 2 0427-GEACUK-01 33300004 3C16671A
33300044 1 2201AS0100XX 33300005 3C16671A-UK
33300045 1 2201AS0100XX 33300006 3C16672A
33300046 1 34000 33300007 3C16672A-UK
33300047 3 34001 33300008 3C16673
33300056 1 34001 33300009 3C16673B
33300059 1 34005 33300010 3C16680
33300060 1 34007 33300011 3C16681
33300121 1 3C16073 33300012 3C16683
33300129 1 3C16073 33300013 3C16684
33300132 1 3C16073 33300014 3C16685
33300133 1 3C16080 33300015 3C16700
33300157 1 3C16405 33300016 3C16700A
33300193 1 3C16405 33300017 3C16701
33300210 1 3C16406 33300018 3C16701A-UK
33300222 1 3C16406-UK 33300019 3C16702
33300223 1 3C16406-UK 33300020 3C16703A-UK
33300224 1 3C16406-UK 33300021 3C16704
33300226 3 3C16450 33300022 3C16710
33300235 1 3C16450 33300023 3C16710-UK
33300237 1 3C16630A 33300024 3C16721A
33300239 1 3C16630A 33300025 3C16723
33300251 1 3C16630A 33300026 3C16750
33300309 1 3C16665A-UK 33300027 3C16750B
33300314 1 3C16671A 33300028 3C16753
 
Before

33300004 1 0046-0000UK-02 33300001 3C16670
33300015 1 0327-00001U-04 33300002 3C16670A-UK
33300035 1 0407-GEDC00-01 33300003 3C16671
33300041 2 0427-GEACUK-01 33300004 3C16671A
33300044 1 2201AS0100XX 33300005 3C16671A-UK
33300045 1 2201AS0100XX 33300006 3C16672A


After


33300004 1 3C16671A

I don't want to post any others as the data won't be correct. As you see in line 4 in column 5, this is the correct code that matches with line 1 in column 1

Where line 5 in column 2 is showing 2, a blank cell will need to put in this column as the data in column 3 will have 2 lines and not 1.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Sorry Potter, I have to go to bed now.

Where line 5 in column 2 is showing 2, a blank cell will need to put in this column as the data in column 3 will have 2 lines and not 1.
Line 5 in column 2 does not show 2, it shows 1.
<!-- / message -->
Apologies if I'm being dense but I'm still confused, and if you can't post 6 lines of sample data, I'm not going to do any more on this.

I'll come back and look again tomorrow to see if you've been able to explain this any better.

Sorry I can't help more now, and good luck.

I am 100% confident that Excel can do what you need. But until I can clearly understand exactly what you need, I can't help you.

Perhaps others on the board can.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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