Acumulado de hojas

roberto

New Member
Joined
Aug 28, 2002
Messages
43
Aqui estoy de vuelta para ver si me pueden ayudar...
Habra alguna manera, ya sea mediante una función o codigo VBA de que se haga lo siguiente:
Tengo las Hojas:
Ene 03
Feb 03
Mar 03
Abr 03
que al copiar la ultima hoja del mes y darle el mes consecutivo (en este caso May 03 por ejemplo) el valor de la celda F5 me ponga el valor de la Hoja Abr 03

Saludos!!!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
La siguiente UDF puede servir:

<font face=Courier New>
<SPAN style="color:darkblue">Function</SPAN> VALORCELDA(DesrefHoja <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Long</SPAN>, Celda <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">String</SPAN>) <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Variant</SPAN>
    <SPAN style="color:darkblue">Dim</SPAN> ShName <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">String</SPAN>, Index <SPAN style="color:darkblue">As</SPAN> <SPAN style="color:darkblue">Long</SPAN>
    Index = Application.Caller.Parent.Index + DesrefHoja
    ShName = Application.Caller.Parent.Parent.Sheets(Index).Name
    VALORCELDA = Range(ShName & "!" & Celda).Value
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Function</SPAN>
</FONT>

Funciona así:

=VALORCELDA(0, "A1")

devolvería el valor de la celda A1 de la hoja actual

=VALORCELDA(-1, "A1")

devolvería el valor de la celda A1 de la hoja anterior

=VALORCELDA(1, "A1")

devolvería el valor de la celda A1 de la hoja siguiente

Si hay algún error (Por ejemplo, usar VALORCELDA(-1, "A1") en la primera hoja del libro) la fórmula devuleve #VALOR!
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,077
Members
449,094
Latest member
mystic19

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