comprobar en Excel un año bisiesto

Fantasma

New Member
Joined
Sep 25, 2002
Messages
7
He encontrado varios codigos de VB pero no he encontrado como aplicarlos a Excel, necesito ayuda pls.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
On 2002-09-30 07:23, Fantasma wrote:
Hola Juan P.

esto fue lo que encontré:

Function BisiestoSINO(Year As Date)As Boolean
Dim Mod400 As Long, Mod100 As Long, Mod4 As Long

BisiestoSINO = False 'Indica si es bisiesto o no
Mod400 = Year Mod 400
Mod100 = Year Mod 100
Mod4 = Year Mod 4

If (Mod400 = 0)then BisiestoSINO = True
If (Mod100 = 0)and(Mod400<>0)then bisiestoSINO =False
If (Modr = 0) and (Mod100<> 0)and(Mod400=0) then Bisiesto = True
End Function


Tambien encontre esta
Function BisiestoSINO (Year As DAte) As Boolean
BisiestoSINO = DAy (DateSerial(Year(fecha),3,0))=29
End function

Gracias por tu atencion.
 
Upvote 0

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

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