Ayuda con

UliCs

New Member
Joined
Oct 20, 2009
Messages
36
Tengo otro problema.Yo no soy nada bueno programando pero me gusta hacer mis tareas rutinarias mas faciles.
espero poder explicar bien. este problemilla.
tengo una tabla donde voy agregando la informacion hacia otra hoja para imprimir.
la idea es que de acuerdo a una condicion se valla imprimiendo cada una de los archivos.
"nota quise agregar la tabla con HJeany, pero me sale un error Error de sistema &H80004005 (-2147467259)"

<table style="border-collapse: collapse; width: 240pt;" border="0" cellpadding="0" cellspacing="0" width="320"><col style="width: 60pt;" span="4" width="80"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl63" style="height: 15pt; width: 60pt;" height="20" width="80">Imprimir?</td> <td class="xl63" style="border-left: medium none; width: 60pt;" width="80">Nombre</td> <td class="xl64" style="border-left: medium none; width: 60pt;" width="80">Edad</td> <td class="xl64" style="border-left: medium none; width: 60pt;" width="80">Grupo</td> </tr> <tr style="height: 18.75pt;" height="25"> <td class="xl65" style="height: 18.75pt; border-top: medium none;" height="25">S/I</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">luis</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">43</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">A4</td> </tr> <tr style="height: 18.75pt;" height="25"> <td class="xl65" style="height: 18.75pt; border-top: medium none;" height="25">3</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">mario</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">45</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">A4</td> </tr> <tr style="height: 18.75pt;" height="25"> <td class="xl65" style="height: 18.75pt; border-top: medium none;" height="25">4</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">esteban</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">76</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">G4</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">S/I</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">juan</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">34</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">G4</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">S/I</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">saul</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">25</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">H2</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">X</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">raul</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">25</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">H2</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">23</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">jorge</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">64</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">A4</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">7</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">alex</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">17</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">F7</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">2</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">maria</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">34</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">A4</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">X</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">alonso</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">32</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">F7</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">23</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">pedro</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">54</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">A4</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; border-top: medium none;" height="20">53</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">antonio</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">28</td> <td class="xl65" style="border-top: medium none; border-left: medium none;">H2</td> </tr> </tbody></table>
si yo coloco en alguna celda de la columna A una "X" la macro valla recorriendo el rango un valla imprimiendo cada archivo. y borrando la X que ya imprimio

lo intente con esta macro pero lo unico que logro es que llegue ala primera X y todos los datos anteriores les escriba "S/I"

Sub test1()
Range("A2").Select
Do While ActiveCell.Value < "X"
ActiveCell.Value = "S/I"
'Imprimir
Selection.Offset(1).Select
Loop

End Sub

la tabla de la otra hoja esta relacionada con Buscarv. para que con esa condicion si borro la primer "X" siga con la siguiente.

<table style="border-collapse: collapse; width: 439px; height: 86px;" border="0" cellpadding="0" cellspacing="0"><col style="width: 60pt;" span="2" width="80"> <tbody><tr style="height: 18.75pt;" height="25"> <td class="xl65" style="height: 18.75pt; width: 60pt;" height="25" width="80">Nombre</td> <td class="xl66" style="border-left: medium none; width: 60pt;" width="80">raul =buscarv("X",A2:D15,2,)
</td> </tr> <tr style="height: 18.75pt;" height="25"> <td class="xl65" style="height: 18.75pt; border-top: medium none;" height="25">Edad</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">25 =buscarv("X",A2:D15,3,)</td> </tr> <tr style="height: 18.75pt;" height="25"> <td class="xl65" style="height: 18.75pt; border-top: medium none;" height="25">Grupo</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">H2 =buscarv("X",A2:D15,4,)</td> </tr> </tbody></table>
espero no haber confundido mucho.

saludos.:ROFLMAO:



<div_prefs id="div_prefs"></div_prefs><div_prefs id="div_prefs"></div_prefs>
 

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.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,708
Messages
5,833,245
Members
430,200
Latest member
ADLHMA2022

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
Top