I think I need a macro...

TripletDad

Board Regular
Joined
Oct 19, 2010
Messages
121
I'm hoping somebody out there can either create a macro, or help with a formula that will save me hours upon hours of work. This is a confusing stuff, but hopefully I can spell it out enough to get some help... :(

I manage a bunch of data in a massive Excel spreadsheet. Unfortunately, I can't input the data all at the same time (it has to pass through different "gates" internally) so, once all the data is populated, I'd like to fill in the last field "automatically" ... maybe through a macro?

I have a spreadsheet that is about 15k rows by 80 columns. For this project, I only need to reference three columns so I can populate the fourth.

Column A = SKU
Column C = Product Type
Column E = Parent ID
Column F = Child ID

Basically, I need to use the data in Column A, C & E to populate Column F.

In English, the macro needs to say "If Column C says anything other than "Simple" or "Simple Simple", then look at Column A and Column E. If Column E matches Column A, then put that value of Column A in Column F. If multiple matches are found, separate the values with a pipe "|".

So, in the example below, the last column (labeled Column F) would be empty before the macro is run.

After it is run, the following happens.

F3 is populated with "92104" because Column A & E match and "91204" is in Column A.
F4 is populated with "895586|895587|895588|895589|895590|895591|" because Column A & E match and those are the values of column A, separated by pipes.

*ABCD
1Column AColumn CColumn EColumn F
2SKUProduct TypeParent IDChildren ID
392103GroupedNA92104
492104Configurable - Part of Group92103895586|895587|895588|895589|895590|895591
5895586Simple92104NA
6895587Simple92104NA
7895588Simple92104NA
8895589Simple92104NA
9895590Simple92104NA
10895591Simple92104NA

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi TripletDad, This was making sense until you explained it. Your narrative does not seem to match your illustation. Might just be me, it's late here.
 
Upvote 0
Hi TripletDad, This was making sense until you explained it. Your narrative does not seem to match your illustation. Might just be me, it's late here.

Aww man! You're right... I should have looked closer before posting... sorry.

Cell F3 should have "91204" in it...
 
Upvote 0

Forum statistics

Threads
1,217,356
Messages
6,136,079
Members
449,988
Latest member
Mabbas

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