Calculate date

doriannjeshi

Active Member
Joined
Apr 5, 2015
Messages
338
Office Version
  1. 365
Platform
  1. Windows
Hello,

Is there a formula to calculate the specific sign knowing when a sign enters the date ?

periodsigndatesign
23/01/1930Aquarius08/12/1930?
16/02/1930Pisces04/05/1930?
12/03/1930Aries06/01/1930?
05/04/1930Taurus-
30/04/1930Gemini-
25/05/1930Cancer-
19/06/1930Leo-
14/07/1930Virgo-
09/08/1930Libra-
07/09/1930Scorpio-
11/10/1930Sagittarius-
22/11/1930Scorpio-
03/01/1931Sagittarius-
 
The dates that you show in Column D look a lot like International Format dates. This column must have real dates.
You can custom format the dates. A format like yyyy-mmm-dd is not ambiguous.

The post below is based on your list of dates. Ensure that the dates that I show are the dates that you intended. These must be real dates and not text.
T202211x.xlsm
EF
1datessign
21961-Jun-06Taurus
31984-Apr-23Aries
41956-Mar-15Taurus
51981-Jul-01Leo
61968-Feb-12Capricorn
71960-Feb-13Capricorn
81968-Apr-01Pisces
91968-Dec-07Capricorn
101978-Aug-21Libra
111978-Apr-21Taurus
121957-Jul-28Virgo
1d_
Cell Formulas
RangeFormula
F2:F12F2=VLOOKUP(E2,B11:C1158,2,1)
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Dates/Times with General format
T202211x.xlsm
ABC
1Dates and timesSign
210982.80694Aquarius
310982Aquarius
410981#N/ANot in lookup info
510981.9Aquarius
611237Scorpio
711005.54167Aquariusexample with the time
811005.80764Piscesexample with the time
1d_
Cell Formulas
RangeFormula
B2:B8B2=VLOOKUP(A2,$B$11:$C$1158,2,1)


Dates/Times with custom format yyyymmmdd hh:mm

T202211x.xlsm
ABC
1Dates and timesSign
21930Jan24 19:22Aquarius
31930Jan24 00:00Aquarius
41930Jan23 00:00#N/ANot in lookup info
51930Jan23 21:36Aquarius
61930Oct06 00:00Scorpio
71930Feb16 13:00Aquariusexample with the time
81930Feb16 19:23Piscesexample with the time
9
1d_
Cell Formulas
RangeFormula
B2:B8B2=VLOOKUP(A2,$B$11:$C$1158,2,1)
 
Upvote 0
I edited the formula; this version may be more robust.
T202211x.xlsm
AB
11
12Raw table datesDate and Time
13Jan 23, 1930 7:22 PM Venus enters Aquarius1930-Jan-23 19:22
14Feb 16, 1930 5:11 PM Venus enters Pisces1930-Feb-16 17:11
15Mar 12, 1930 5:34 PM Venus enters Aries1930-Mar-12 17:34
16Apr 5, 1930 9:57 PM Venus enters Taurus1930-Apr-05 09:57
17Apr 30, 1930 8:37 AM Venus enters Gemini1930-Apr-30 08:37
18May 25, 1930 12:36 AM Venus enters Cancer1930-May-25 00:36
19June 19, 1930 12:39 AM Venus enters Leo1930-Jun-19 00:39
20July 14, 1930 12:34 PM Venus enters Virgo1930-Jul-14 12:34
21Aug 9, 1930 18:54 Venus enters Libra1930-Aug-09 18:54
22Sep 7, 1930 12:05 AM Venus enters Scorpio1930-Sep-07 12:05
23Oct 11, 1930 9:45 PM Venus enters Sagittarius1930-Oct-11 21:45
24
2a
Cell Formulas
RangeFormula
B13:B23B13=ConvertToDate(LEFT(A13,FIND("~",SUBSTITUTE(A13," ","~",5))))
 
Upvote 0
Solution
With some of the source data that you provided, there was a variety of extra spaces in the data.
The latest version of the formula uses the 5th space.
You can add a column for just the Date/Time portion and ensure that it is correct.
If you manually edit column A say to remove extra space, the results will show in the other columns.

T202211x.xlsm
ABCD
1With 365With earlier versions of ExcelHelper Column
2Apr 2, 2011 12:51 AM Mars enters Aries2011-Apr-02 12:51 AM2011-Apr-02 12:51 AMApr 2, 2011 12:51 AM
3Aug 3, 2011 5:22 AM Mars enters Cancer2011-Aug-03 5:22 AM2011-Aug-03 5:22 AMAug 3, 2011 5:22 AM
4July 3, 2012 8:32 AM Mars enters Libra2012-Jul-03 8:32 AM2012-Jul-03 8:32 AMJuly 3, 2012 8:32 AM
3dd
Cell Formulas
RangeFormula
B2:B4B2=ConvertToDate(TEXTBEFORE(A2," ",5))
C2:C4C2=ConvertToDate(LEFT(A2,FIND("~",SUBSTITUTE(A2," ","~",5))))
D2:D4D2=TEXTBEFORE(A2," ",5)
 
Upvote 0
With some of the source data that you provided, there was a variety of extra spaces in the data.
The latest version of the formula uses the 5th space.
You can add a column for just the Date/Time portion and ensure that it is correct.
If you manually edit column A say to remove extra space, the results will show in the other columns.

T202211x.xlsm
ABCD
1With 365With earlier versions of ExcelHelper Column
2Apr 2, 2011 12:51 AM Mars enters Aries2011-Apr-02 12:51 AM2011-Apr-02 12:51 AMApr 2, 2011 12:51 AM
3Aug 3, 2011 5:22 AM Mars enters Cancer2011-Aug-03 5:22 AM2011-Aug-03 5:22 AMAug 3, 2011 5:22 AM
4July 3, 2012 8:32 AM Mars enters Libra2012-Jul-03 8:32 AM2012-Jul-03 8:32 AMJuly 3, 2012 8:32 AM
3dd
Cell Formulas
RangeFormula
B2:B4B2=ConvertToDate(TEXTBEFORE(A2," ",5))
C2:C4C2=ConvertToDate(LEFT(A2,FIND("~",SUBSTITUTE(A2," ","~",5))))
D2:D4D2=TEXTBEFORE(A2," ",5)
This is great :biggrin:
Thank you mr Patton!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,225
Members
453,025
Latest member
Hannah_Pham93

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