ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   returning a value from a string in a single cell (https://www.excelbanter.com/excel-worksheet-functions/107163-returning-value-string-single-cell.html)

AG

returning a value from a string in a single cell
 
I am using Excel 2000.
I have a very long list of numbers that were entered on a given day during
the year. I want to add all of the numbers that were entered during a given
month. The date column of my data is formatted with 1/1/05 to 12/31/05. How
can I select only the numbers entered in a given month and total them for
that month?
--
Alan

Bob Umlas

returning a value from a string in a single cell
 
If the dates are in A1:A365 and the values are in B1:B365:
=SUMPRODUCT(--(MONTH(A1:A365)=8),B1:B365)
will sum B for August months.

"AG" wrote in message
...
I am using Excel 2000.
I have a very long list of numbers that were entered on a given day during
the year. I want to add all of the numbers that were entered during a
given
month. The date column of my data is formatted with 1/1/05 to 12/31/05.
How
can I select only the numbers entered in a given month and total them for
that month?
--
Alan




AG

returning a value from a string in a single cell
 
When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.
--
Alan


"Bob Umlas" wrote:

If the dates are in A1:A365 and the values are in B1:B365:
=SUMPRODUCT(--(MONTH(A1:A365)=8),B1:B365)
will sum B for August months.

"AG" wrote in message
...
I am using Excel 2000.
I have a very long list of numbers that were entered on a given day during
the year. I want to add all of the numbers that were entered during a
given
month. The date column of my data is formatted with 1/1/05 to 12/31/05.
How
can I select only the numbers entered in a given month and total them for
that month?
--
Alan





Dave Peterson

returning a value from a string in a single cell
 
What formula did you use? What error message did you receive?

AG wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.
--
Alan

"Bob Umlas" wrote:

If the dates are in A1:A365 and the values are in B1:B365:
=SUMPRODUCT(--(MONTH(A1:A365)=8),B1:B365)
will sum B for August months.

"AG" wrote in message
...
I am using Excel 2000.
I have a very long list of numbers that were entered on a given day during
the year. I want to add all of the numbers that were entered during a
given
month. The date column of my data is formatted with 1/1/05 to 12/31/05.
How
can I select only the numbers entered in a given month and total them for
that month?
--
Alan





--

Dave Peterson

Richard Buttrey

returning a value from a string in a single cell
 
On Fri, 25 Aug 2006 16:29:02 -0700, AG
wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.


Are the dates real Excel date numbers, or just text strings?

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________

AG

returning a value from a string in a single cell
 
I used the formula as listed by Bob.
The error message I get is: "The formula you typed contains an error."
It offers no help to correct the error.
--
Alan


"Dave Peterson" wrote:

What formula did you use? What error message did you receive?

AG wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.
--
Alan

"Bob Umlas" wrote:

If the dates are in A1:A365 and the values are in B1:B365:
=SUMPRODUCT(--(MONTH(A1:A365)=8),B1:B365)
will sum B for August months.

"AG" wrote in message
...
I am using Excel 2000.
I have a very long list of numbers that were entered on a given day during
the year. I want to add all of the numbers that were entered during a
given
month. The date column of my data is formatted with 1/1/05 to 12/31/05.
How
can I select only the numbers entered in a given month and total them for
that month?
--
Alan




--

Dave Peterson


Dave Peterson

returning a value from a string in a single cell
 
Do you use USA settings?
Do you use an English version of excel?

For most people in the USA, the list separator is a comma. For lots of other
folks (are you in Europe), they use a semicolon (;).



AG wrote:

I used the formula as listed by Bob.
The error message I get is: "The formula you typed contains an error."
It offers no help to correct the error.
--
Alan

"Dave Peterson" wrote:

What formula did you use? What error message did you receive?

AG wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.
--
Alan

"Bob Umlas" wrote:

If the dates are in A1:A365 and the values are in B1:B365:
=SUMPRODUCT(--(MONTH(A1:A365)=8),B1:B365)
will sum B for August months.

"AG" wrote in message
...
I am using Excel 2000.
I have a very long list of numbers that were entered on a given day during
the year. I want to add all of the numbers that were entered during a
given
month. The date column of my data is formatted with 1/1/05 to 12/31/05.
How
can I select only the numbers entered in a given month and total them for
that month?
--
Alan




--

Dave Peterson


--

Dave Peterson

AG

returning a value from a string in a single cell
 
The cells were "general" format, but, when I changed them to date format, I
still get the same error message. If I use the LEFT(A2,2) function, it
returns "1/", so it appears to me that number is formatted ok.
--
Alan


"Richard Buttrey" wrote:

On Fri, 25 Aug 2006 16:29:02 -0700, AG
wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.


Are the dates real Excel date numbers, or just text strings?

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


Pete_UK

returning a value from a string in a single cell
 
No, this means the cells are text - if they were entered as proper
dates then a LEFT function would return a number like 39. Do you see an
apostrophe in the formula bar when you click on one of the dates?

Pete

AG wrote:
The cells were "general" format, but, when I changed them to date format, I
still get the same error message. If I use the LEFT(A2,2) function, it
returns "1/", so it appears to me that number is formatted ok.
--
Alan


"Richard Buttrey" wrote:

On Fri, 25 Aug 2006 16:29:02 -0700, AG
wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.


Are the dates real Excel date numbers, or just text strings?

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________



AG

returning a value from a string in a single cell
 
I am in the US.
--
Alan


"Dave Peterson" wrote:

Do you use USA settings?
Do you use an English version of excel?

For most people in the USA, the list separator is a comma. For lots of other
folks (are you in Europe), they use a semicolon (;).



AG wrote:

I used the formula as listed by Bob.
The error message I get is: "The formula you typed contains an error."
It offers no help to correct the error.
--
Alan

"Dave Peterson" wrote:

What formula did you use? What error message did you receive?

AG wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.
--
Alan

"Bob Umlas" wrote:

If the dates are in A1:A365 and the values are in B1:B365:
=SUMPRODUCT(--(MONTH(A1:A365)=8),B1:B365)
will sum B for August months.

"AG" wrote in message
...
I am using Excel 2000.
I have a very long list of numbers that were entered on a given day during
the year. I want to add all of the numbers that were entered during a
given
month. The date column of my data is formatted with 1/1/05 to 12/31/05.
How
can I select only the numbers entered in a given month and total them for
that month?
--
Alan




--

Dave Peterson


--

Dave Peterson


AG

returning a value from a string in a single cell
 
I do not see an apostrophe in the formula bar when I click on a date.
--
Alan


"Pete_UK" wrote:

No, this means the cells are text - if they were entered as proper
dates then a LEFT function would return a number like 39. Do you see an
apostrophe in the formula bar when you click on one of the dates?

Pete

AG wrote:
The cells were "general" format, but, when I changed them to date format, I
still get the same error message. If I use the LEFT(A2,2) function, it
returns "1/", so it appears to me that number is formatted ok.
--
Alan


"Richard Buttrey" wrote:

On Fri, 25 Aug 2006 16:29:02 -0700, AG
wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.

Are the dates real Excel date numbers, or just text strings?

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________




AG

returning a value from a string in a single cell
 
Based on other inputs, it appears that the dates are really text strings and
not excel dates.
--
Alan


"Richard Buttrey" wrote:

On Fri, 25 Aug 2006 16:29:02 -0700, AG
wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.


Are the dates real Excel date numbers, or just text strings?

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


Pete_UK

returning a value from a string in a single cell
 
Try this on a blank worksheet: in cell A1 enter 1/10/06 and in cell A2
enter '1/10/06 (with an apostrophe). They both look like dates, but
widen the column - a proper date (the first one) will be right-aligned,
whereas the text date will be left-aligned. Enter this formula in B1:

=LEFT(A1,2)

and copy to B2 - you should see 39 in B1 and 1/ in B2.

As a further check, highlight the column containing your dates then
click Format | Cells | Number (tab) | Date and choose a format like
03/14/98 from the list - do all your dates change to this format? Then
repeat, but choose 14-Mar-98 from the list - do they all follow this
format? If not, then your dates are text.

While the column is highlighted, click Data | Text-to-columns then
click Finish - this should convert them away from Text.

Hope this helps - it's getting late here, but hopefully someone else
can carry on with this.

Pete

AG wrote:
I do not see an apostrophe in the formula bar when I click on a date.
--
Alan


"Pete_UK" wrote:

No, this means the cells are text - if they were entered as proper
dates then a LEFT function would return a number like 39. Do you see an
apostrophe in the formula bar when you click on one of the dates?

Pete

AG wrote:
The cells were "general" format, but, when I changed them to date format, I
still get the same error message. If I use the LEFT(A2,2) function, it
returns "1/", so it appears to me that number is formatted ok.
--
Alan


"Richard Buttrey" wrote:

On Fri, 25 Aug 2006 16:29:02 -0700, AG
wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.

Are the dates real Excel date numbers, or just text strings?

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________





Dave Peterson

returning a value from a string in a single cell
 
I'd try retyping that formula from scratch.

If that doesn't work, copy the formula from the formula bar and paste it into
your response.

AG wrote:

I am in the US.
--
Alan

"Dave Peterson" wrote:

Do you use USA settings?
Do you use an English version of excel?

For most people in the USA, the list separator is a comma. For lots of other
folks (are you in Europe), they use a semicolon (;).



AG wrote:

I used the formula as listed by Bob.
The error message I get is: "The formula you typed contains an error."
It offers no help to correct the error.
--
Alan

"Dave Peterson" wrote:

What formula did you use? What error message did you receive?

AG wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.
--
Alan

"Bob Umlas" wrote:

If the dates are in A1:A365 and the values are in B1:B365:
=SUMPRODUCT(--(MONTH(A1:A365)=8),B1:B365)
will sum B for August months.

"AG" wrote in message
...
I am using Excel 2000.
I have a very long list of numbers that were entered on a given day during
the year. I want to add all of the numbers that were entered during a
given
month. The date column of my data is formatted with 1/1/05 to 12/31/05.
How
can I select only the numbers entered in a given month and total them for
that month?
--
Alan




--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

Dave Peterson

returning a value from a string in a single cell
 
You may not get the answer you want. In fact, your formula may return an error.

But the data won't cause this error:
"The formula you typed contains an error."



AG wrote:

Based on other inputs, it appears that the dates are really text strings and
not excel dates.
--
Alan

"Richard Buttrey" wrote:

On Fri, 25 Aug 2006 16:29:02 -0700, AG
wrote:

When I enter this formula into my spreadsheet, I get an error message. Here
is how the data is loaded into the spreadsheet:
date hours
1/1/05 36.5
12/15/05 15.2
8/8/05 24.0

I need to select the data in the "hours" column based on the month in the
"date" column.


Are the dates real Excel date numbers, or just text strings?

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


--

Dave Peterson


All times are GMT +1. The time now is 08:14 PM.

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