Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Replacing Part of a Cell's Content

Is there a way to change part of a cell's content? I have the following data -

7/7/2008 1:25:00 PM
7/7/2008 1:18:00 PM
7/7/2008 6:19:00 PM
7/7/2008 12:34:00 AM

I want to change 7/7/2008 to Jul-07 but still keep the time the way it is.
I can change the way the data is viewed (using Format, Cell, Number) but it
doesn't change the actual data in the cell. If I do a Replace command it
replaces all the data and I lose the time information. I need to change the
date data because if not I cannot get a COUNT IF function to work on it. Any
ideas? Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Replacing Part of a Cell's Content

If I understand you correctly Instead of selecting number select Custom.
Paste this into the texbox - mmm-yy h:mm:ss AM/PM

"mommy2kh" wrote:

Is there a way to change part of a cell's content? I have the following data -

7/7/2008 1:25:00 PM
7/7/2008 1:18:00 PM
7/7/2008 6:19:00 PM
7/7/2008 12:34:00 AM

I want to change 7/7/2008 to Jul-07 but still keep the time the way it is.
I can change the way the data is viewed (using Format, Cell, Number) but it
doesn't change the actual data in the cell. If I do a Replace command it
replaces all the data and I lose the time information. I need to change the
date data because if not I cannot get a COUNT IF function to work on it. Any
ideas? Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Replacing Part of a Cell's Content

Thanks for your reply. I have the Custom Format set up already but that only
changes the way the data is viewed, not the actual cell content. Is there a
way to change part of a cell's content? Thanks!

"Mike" wrote:

If I understand you correctly Instead of selecting number select Custom.
Paste this into the texbox - mmm-yy h:mm:ss AM/PM

"mommy2kh" wrote:

Is there a way to change part of a cell's content? I have the following data -

7/7/2008 1:25:00 PM
7/7/2008 1:18:00 PM
7/7/2008 6:19:00 PM
7/7/2008 12:34:00 AM

I want to change 7/7/2008 to Jul-07 but still keep the time the way it is.
I can change the way the data is viewed (using Format, Cell, Number) but it
doesn't change the actual data in the cell. If I do a Replace command it
replaces all the data and I lose the time information. I need to change the
date data because if not I cannot get a COUNT IF function to work on it. Any
ideas? Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Replacing Part of a Cell's Content

One tinker ..

In B1, copied down:
=TEXT(A1,"'mmm-dd")&" "&TEXT(A1,"h:mm:ss AM/PM")

Then in C1:
=SUMPRODUCT(--ISNUMBER(SEARCH("Jul-07",B1:B100)))
to count
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:15,700 Files:353 Subscribers:53
xdemechanik
---
"mommy2kh" wrote:
Thanks for your reply. I have the Custom Format set up already but that only
changes the way the data is viewed, not the actual cell content. Is there a
way to change part of a cell's content? Thanks!


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Replacing Part of a Cell's Content

On Sat, 12 Jul 2008 17:21:00 -0700, mommy2kh
wrote:

Is there a way to change part of a cell's content? I have the following data -

7/7/2008 1:25:00 PM
7/7/2008 1:18:00 PM
7/7/2008 6:19:00 PM
7/7/2008 12:34:00 AM

I want to change 7/7/2008 to Jul-07 but still keep the time the way it is.
I can change the way the data is viewed (using Format, Cell, Number) but it
doesn't change the actual data in the cell. If I do a Replace command it
replaces all the data and I lose the time information. I need to change the
date data because if not I cannot get a COUNT IF function to work on it. Any
ideas? Thanks!


If you want Excel to view the data as a date or date + time, you won't be able
to change the contents the way you want.

Since you know how to display it the way you want, and your problem is the
COUNTIF function, it seems to me it would be easier to work with that.

You didn't post what you wanted to do with the COUNTIF function, but, for
example, if you want to COUNT all entries that occurred on Jul-07 during any
year, you could use SUMPRODUCT:

=SUMPRODUCT((MONTH(rng)=7)*(DAY(rng)=7))
--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default Replacing Part of a Cell's Content

If you simply want to count entries in July-08 you could leave the data as is
and use

=SUMPRODUCT((MONTH(A1:A100)=7)*(YEAR(A1:A100)=2008 ))

"Max" wrote:

One tinker ..

In B1, copied down:
=TEXT(A1,"'mmm-dd")&" "&TEXT(A1,"h:mm:ss AM/PM")

Then in C1:
=SUMPRODUCT(--ISNUMBER(SEARCH("Jul-07",B1:B100)))
to count
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:15,700 Files:353 Subscribers:53
xdemechanik
---
"mommy2kh" wrote:
Thanks for your reply. I have the Custom Format set up already but that only
changes the way the data is viewed, not the actual cell content. Is there a
way to change part of a cell's content? 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
Need to refer to a cell's address, not it's content... aduroche Excel Discussion (Misc queries) 3 October 18th 07 08:54 PM
Printing cell's content larger than cell width Neophyte New Users to Excel 1 October 14th 07 09:20 PM
Replacing Table_array to a cell content toolate88 Excel Worksheet Functions 3 August 4th 07 10:52 PM
Automatically filling in cells based on another cell's content Ginger Excel Worksheet Functions 5 September 2nd 05 09:17 AM
How do you copy a cell's content verses it's formula? Tammy Excel Discussion (Misc queries) 1 March 2nd 05 06:30 PM


All times are GMT +1. The time now is 09:10 PM.

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"