#1   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default text / formula help

Hi, trying to find a number within text, to do a calculation on it. Item is as:
:060101 at the left of a cell, with text following.

(if can treat as a date in another cell: to add/subtract 5 days, would be
the 2nd question).

thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Govind
 
Posts: n/a
Default text / formula help

Hi,

Use

=DATE(MID(A1,6,2),MID(A1,4,2),MID(A1,2,2)+5)

where A1 has the number and text. I have assumed that the number
position is exactly as you described. The formula might change if not.

Regards

Govind.

nastech wrote:
Hi, trying to find a number within text, to do a calculation on it. Item is as:
:060101 at the left of a cell, with text following.

(if can treat as a date in another cell: to add/subtract 5 days, would be
the 2nd question).

thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default text / formula help

That was Great!! Thanks, been trying to figure that out for awhile,
if I can ask, first: think you had values reversed, as I made work:
=DATE(MID(A1,2,2),MID(A1,4,2),MID(A1,6,2)+5)

verify will show if within 5 days, right? but how do I put in equation to
make use of
trying:
=IF(DATE(MID(C6,2,6)DATE(MID(C6,2,2),MID(C6,4,2), MID(C6,6,2)+5,"Y","N")

does not quite work, am I missing a parenthesis? comma.. thanks..


"Govind" wrote:

Hi,

Use

=DATE(MID(A1,6,2),MID(A1,4,2),MID(A1,2,2)+5)

where A1 has the number and text. I have assumed that the number
position is exactly as you described. The formula might change if not.

Regards

Govind.

nastech wrote:
Hi, trying to find a number within text, to do a calculation on it. Item is as:
:060101 at the left of a cell, with text following.

(if can treat as a date in another cell: to add/subtract 5 days, would be
the 2nd question).

thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default text / formula help

Think I have it.. sorry for the repeat/ sloppy formula, something like:
salute.
=IF(TODAY()DATE(MID(C6,2,2),MID(C6,4,2),MID(C6,6, 2)+5),"yES")

"Govind" wrote:

Hi,

Use

=DATE(MID(A1,6,2),MID(A1,4,2),MID(A1,2,2)+5)

where A1 has the number and text. I have assumed that the number
position is exactly as you described. The formula might change if not.

Regards

Govind.

nastech wrote:
Hi, trying to find a number within text, to do a calculation on it. Item is as:
:060101 at the left of a cell, with text following.

(if can treat as a date in another cell: to add/subtract 5 days, would be
the 2nd question).

thanks


  #5   Report Post  
Posted to microsoft.public.excel.misc
Govind
 
Posts: n/a
Default text / formula help

Ok. great.Happy to help

Govind.

nastech wrote:

Think I have it.. sorry for the repeat/ sloppy formula, something like:
salute.
=IF(TODAY()DATE(MID(C6,2,2),MID(C6,4,2),MID(C6,6, 2)+5),"yES")

"Govind" wrote:


Hi,

Use

=DATE(MID(A1,6,2),MID(A1,4,2),MID(A1,2,2)+5)

where A1 has the number and text. I have assumed that the number
position is exactly as you described. The formula might change if not.

Regards

Govind.

nastech wrote:

Hi, trying to find a number within text, to do a calculation on it. Item is as:
:060101 at the left of a cell, with text following.

(if can treat as a date in another cell: to add/subtract 5 days, would be
the 2nd question).

thanks




  #6   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default text / formula help

Hi, if still there, cannot get the following to work, any ideas?

=IF(TODAY()DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6, 2)-$A$4),"yes","no")

details:
am trying to find a number within text, to do a calculation on it. Item is as:
:060120 at the left of a cell, with text following.

(need to treat as a date in another cell: to See if within future range of
x days)
A4 has: 5
B4 has: =TODAY()
C4 has:
:060122

D4 has:
=DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6,2)-$A$4) seems to work

not working:
=IF(TODAY()DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6, 2)-$A$4),"yes","no")


"Govind" wrote:

Hi,

Use

=DATE(MID(A1,6,2),MID(A1,4,2),MID(A1,2,2)+5)

where A1 has the number and text. I have assumed that the number
position is exactly as you described. The formula might change if not.

Regards

Govind.

nastech wrote:
Hi, trying to find a number within text, to do a calculation on it. Item is as:
:060101 at the left of a cell, with text following.

(if can treat as a date in another cell: to add/subtract 5 days, would be
the 2nd question).

thanks


  #7   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default text/formula (ans: add +100 to yr for equation)

Hi, found Answer, thought you might like:
If you format the cell with the date expression that works in to show
the year as 4 figures you will see it is 1906 not 2006 as you probably
think, the logic works but the date is not the date you think it is, if
in the year bit of the formula you add +100 it should work as you want

=IF(TODAY()DATE(MID(C4,2,2)+100,MID(C4,4,2),MID(C 4,6,
2)-$A$4),"yes","no")

"Govind" wrote:

Hi,

Use

=DATE(MID(A1,6,2),MID(A1,4,2),MID(A1,2,2)+5)

where A1 has the number and text. I have assumed that the number
position is exactly as you described. The formula might change if not.

Regards

Govind.

nastech wrote:
Hi, trying to find a number within text, to do a calculation on it. Item is as:
:060101 at the left of a cell, with text following.

(if can treat as a date in another cell: to add/subtract 5 days, would be
the 2nd question).

thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert text to formula - Help pleaaase Ayrton Excel Discussion (Misc queries) 5 December 7th 05 05:26 PM
text in formula explaining formula not to print Leon Klopper Excel Worksheet Functions 1 June 24th 05 01:04 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Using the text from a cell as a range name in a formula Fletch Excel Discussion (Misc queries) 3 June 13th 05 07:57 PM
Concatenation formula loses text wrap formatting DFM Excel Discussion (Misc queries) 5 December 27th 04 01:45 PM


All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"