how to merge multi If with Vlookup ?

belal

New Member
Joined
Mar 13, 2016
Messages
38
Dears,
kindly I want to fill Column sub Category 1 & 2 from another sheet with the Following Condition


Sub Category 1 will be :
if (Activity coloumn = 211 or 212) : COGS
if (Activity
[FONT=&quot]coloumn[/FONT][FONT=&quot]= 111 or 231) : G&A[/FONT]
if (Activity [FONT=&quot]coloumn[/FONT][FONT=&quot]= 111 or 231 & Cost center = 312 & 341 ) : S&M

i think i need to make multi If Function + Vlookup [/FONT]:confused::confused::confused:[FONT=&quot] [/FONT]


ِAccount NumberActivityCost CenterSUb Category 1Sub Category 2
52310101

<tbody>
</tbody>
211211

53130150

<tbody>
</tbody>
212325

53140101

<tbody>
</tbody>
111400

53140103

<tbody>
</tbody>
231410

53140109

<tbody>
</tbody>
231312

53150150

<tbody>
</tbody>
111341


<tbody>
</tbody>
 
please could you give a hand, as i need it urgently for my work, the sheet include around 30K row so it's too long
So what goes in the last 2 columns?

Excel 2010
ABCDE
1Account NumberActivityCost CenterSUb Category 1Sub Category 2
252310101211211
353130150212325
453140101111400
553140103231410
653140109231312
753150150111341

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet16
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
if i put equation for Vlookup he will get all result from the first line, in other words if put vlookup he will give all result will be G&A withour consider other condition in Cost center

Could you explain this part further?
 
Upvote 0
did you saw post # 8?
this is like sheet I had, so when I make your suggest equation and replace "COGS" & " S&M" & "G&A" with Equation Vlookup, the result wasn't correct.
line 6 will have the same result of line 5, which is not correct. on another side, i replace above words with vlookup cause the name change so i want the name in the Data base

i clarify my case in post #8 & 18 & 20

Could you explain this part further?
 
Upvote 0
that's how it shall be
All lines have only two criteria (Account number & Activity ) but if the cost center include (312 & 341) it's treated with another exception

Excel 2010
ABCDE
1Account NumberActivityCost CenterSUb Category 1Sub Category 2
252310101211211
353130150212325
453140101111400G&A XXX
553140103231410G&A XXX
653140109231312S&M XXX
753150150111341S&M XXX

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet16

[/QUOTE]
 
Upvote 0
all lines from 1 to 5 have no problem, just make an equation with 2 criteria (Account number & Activity ) but in line 6 & 7 they include cost center ( 312 & 341) that's why there new result

that's how it shall be
All lines have only two criteria (Account number & Activity ) but if the cost center include (312 & 341) it's treated with another exception

Excel 2010
ABCDE
1Account NumberActivityCost CenterSUb Category 1Sub Category 2
252310101211211
353130150212325
453140101111400G&A XXX
553140103231410G&A XXX
653140109231312S&M XXX
753150150111341S&M XXX

<tbody>
</tbody>
Sheet16
[/QUOTE]
 
Upvote 0
what do you think i shall do? and i can't make a pivot table and filter...cause it's a huge data, so i need to create a function for every row

all lines from 1 to 5 have no problem, just make an equation with 2 criteria (Account number & Activity ) but in line 6 & 7 they include cost center ( 312 & 341) that's why there new result
[/QUOTE]
 
Upvote 0

Forum statistics

Threads
1,215,078
Messages
6,122,997
Members
449,093
Latest member
masterms

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