drag upper cell value from non contiguous cell until empty cell is found vba

namariegaudi

New Member
Joined
Oct 14, 2016
Messages
14
I have a table that looks like this (see below). I want to put in a new column the value that says "Nombre:XXXXXX" until a new value of "Nombre:" is found and then drag that new value intul I have a new column with names repeated. I know some names roll over to other columns and would need to concatenate those first
[TABLE="width: 554"]
<colgroup><col><col span="4"><col><col></colgroup><tbody>[TR]
[TD]Nombre:DETERGENTE[/TD]
[TD]LUBRO[/TD]
[TD]CLEAN[/TD]
[TD="align: right"]387[/TD]
[TD]LT[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]05/Sep/20A[/TD]
[TD="align: right"]1,025[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]10,656.00[/TD]
[/TR]
[TR]
[TD]09/Sep/20A[/TD]
[TD="align: right"]1,026[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1,035.00[/TD]
[/TR]
[TR]
[TD]13/Sep/20A[/TD]
[TD="align: right"]1,027[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]11,576.00[/TD]
[/TR]
[TR]
[TD]20/Sep/20A[/TD]
[TD="align: right"]1,030[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]10,816.00[/TD]
[/TR]
[TR]
[TD]20/Sep/20A[/TD]
[TD="align: right"]1,031[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]10,816.00[/TD]
[/TR]
[TR]
[TD]27/Sep/20A[/TD]
[TD="align: right"]1,033[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]10,816.00[/TD]
[/TR]
[TR]
[TD]28/Sep/20A[/TD]
[TD="align: right"]1,036[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6,000.00[/TD]
[/TR]
[TR]
[TD]30/Sep/20A[/TD]
[TD="align: right"]1,037[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]10,816.00[/TD]
[/TR]
[TR]
[TD]Nombre:LUBRO[/TD]
[TD]RUST[/TD]
[TD]OFF[/TD]
[TD]PSM[/TD]
[TD]LT[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20/Sep/20A[/TD]
[TD="align: right"]1,031[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD]27/Sep/20A[/TD]
[TD="align: right"]1,033[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD]30/Sep/20A[/TD]
[TD="align: right"]1,037[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD]Nombre:LUBRO[/TD]
[TD]DL200/MX/TRN[/TD]
[TD]LT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]09/Sep/20A[/TD]
[TD="align: right"]1,026[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]11,000.00[/TD]
[/TR]
[TR]
[TD]20/Sep/20A[/TD]
[TD="align: right"]1,030[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]11,000.00[/TD]
[/TR]
[TR]
[TD]27/Sep/20A[/TD]
[TD="align: right"]1,033[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6,000.00[/TD]
[/TR]
[TR]
[TD]28/Sep/20A[/TD]
[TD="align: right"]1,036[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]6,000.00[/TD]
[/TR]
[TR]
[TD]30/Sep/20A[/TD]
[TD="align: right"]1,037[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]9,000.00[/TD]
[/TR]
[TR]
[TD]Nombre:FLUIDO[/TD]
[TD]SINTENTICO[/TD]
[TD]LUBRO[/TD]
[TD]SINT[/TD]
[TD="align: right"]55[/TD]
[TD]LT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]09/Sep/20A[/TD]
[TD="align: right"]1,026[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]800[/TD]
[/TR]
[TR]
[TD]28/Sep/20A[/TD]
[TD="align: right"]1,036[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]400[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total[/TD]
[TD]Cliente[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]117,931.00[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Nombre:[/TD]
[TD]BARRILES[/TD]
[TD]METALICOS[/TD]
[TD]SA[/TD]
[TD]DE[/TD]
[TD]CV[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Nombre:TAMBOR[/TD]
[TD]VACIO[/TD]
[TD="align: right"]200[/TD]
[TD]LT[/TD]
[TD]PZA[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]30/Sep/20A[/TD]
[TD="align: right"]1,038[/TD]
[TD]Factura[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]192[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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