ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Custom Format for WEEKNUM(Today()) (https://www.excelbanter.com/excel-discussion-misc-queries/3575-custom-format-weeknum-today.html)

RonB

Custom Format for WEEKNUM(Today())
 
I am using WEEKNUM in Excel to do some COUNTIF functions and have problems
with matches because Excel returns a single digit rather than 2 of weeks 1
throuhg 9 of any given year. Using teh COUNTIF function 20051 then
mathmatically is the same as 200510. Is there some way to format the week
returned to be 2 digits?

--
RonB

Arvi Laanemets

Hi

Something like this:
=TEXT(WEEKNUM(A1),"00")


Arvi Laanemets


"RonB" wrote in message
...
I am using WEEKNUM in Excel to do some COUNTIF functions and have problems
with matches because Excel returns a single digit rather than 2 of weeks 1
throuhg 9 of any given year. Using teh COUNTIF function 20051 then
mathmatically is the same as 200510. Is there some way to format the week
returned to be 2 digits?

--
RonB




RonB

Thanks...

This solved my problem.

"Arvi Laanemets" wrote:

Hi

Something like this:
=TEXT(WEEKNUM(A1),"00")


Arvi Laanemets


"RonB" wrote in message
...
I am using WEEKNUM in Excel to do some COUNTIF functions and have problems
with matches because Excel returns a single digit rather than 2 of weeks 1
throuhg 9 of any given year. Using teh COUNTIF function 20051 then
mathmatically is the same as 200510. Is there some way to format the week
returned to be 2 digits?

--
RonB






All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com