Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I downloaded "sunrise/sunset" data into an Excel 2003 spreadhseet but the
times came as numbers, like "1622". I want to convert that to "16:22" but the format cell option does not work. It converts it to a date and a time (noon). Since the times change every few cells, search and replace is inefficient. I tried searching for 16** and replacing them with 16:** but Excel took that liberally. Is there a wildcard command to replace these numbers: 1622, 1623, 1624 with 16:22, 16:23, 16:24? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=TIME(INT(A1/100),MOD(A1,100),0)
-- Kind regards, Niek Otten Microsoft MVP - Excel "nantucketbob" wrote in message ... I downloaded "sunrise/sunset" data into an Excel 2003 spreadhseet but the times came as numbers, like "1622". I want to convert that to "16:22" but the format cell option does not work. It converts it to a date and a time (noon). Since the times change every few cells, search and replace is inefficient. I tried searching for 16** and replacing them with 16:** but Excel took that liberally. Is there a wildcard command to replace these numbers: 1622, 1623, 1624 with 16:22, 16:23, 16:24? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way is to transform those numbers to Excel time values with this formula
in another cell (1622 being in A1): =TIMEVALUE(LEFT(A1,2)&":"&RIGHT(A1,2)) Format the result cells like time! If necessary, you can overwrite the original numbers with the time values via Copy/PasteSpecial-Values. -- Regards! Stefi €žnantucketbob€ť ezt Ă*rta: I downloaded "sunrise/sunset" data into an Excel 2003 spreadhseet but the times came as numbers, like "1622". I want to convert that to "16:22" but the format cell option does not work. It converts it to a date and a time (noon). Since the times change every few cells, search and replace is inefficient. I tried searching for 16** and replacing them with 16:** but Excel took that liberally. Is there a wildcard command to replace these numbers: 1622, 1623, 1624 with 16:22, 16:23, 16:24? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One more...
if 16:22 means 16 hours, 22 minutes, 0 seconds: =--text(a1,"00\:00") if 16:22 means 0 hours, 16 minutes, 22 seconds: =--text(a1,"00\:00\:00") And format the cell as a time. The first minus coerces the text value into a number, but it's a negative number. The second minus changes the sign back to positive/non-negative. nantucketbob wrote: I downloaded "sunrise/sunset" data into an Excel 2003 spreadhseet but the times came as numbers, like "1622". I want to convert that to "16:22" but the format cell option does not work. It converts it to a date and a time (noon). Since the times change every few cells, search and replace is inefficient. I tried searching for 16** and replacing them with 16:** but Excel took that liberally. Is there a wildcard command to replace these numbers: 1622, 1623, 1624 with 16:22, 16:23, 16:24? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
replace letters for numbers | Excel Discussion (Misc queries) | |||
replace numbers with X | Excel Discussion (Misc queries) | |||
How do I replace numbers in a value NOT a formula? | Excel Discussion (Misc queries) | |||
greater than replace numbers | Excel Worksheet Functions | |||
How to Replace numbers and text with numbers only? | Excel Worksheet Functions |