Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default How do I ask a cell to look only at the first character in a cell

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default How do I ask a cell to look only at the first character in a cell

You can't use the same cell, you would need a help cell

=IF(OR(LEFT(C2)="A",LEFT(C2)="H"),1,"")



--
Regards,

Peo Sjoblom



"soconfused" wrote in message
...
I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula
here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default How do I ask a cell to look only at the first character in a c

Can I get them separated? Like the A's in one row, the H's in another row
and so on?
--
DMM


"Peo Sjoblom" wrote:

You can't use the same cell, you would need a help cell

=IF(OR(LEFT(C2)="A",LEFT(C2)="H"),1,"")



--
Regards,

Peo Sjoblom



"soconfused" wrote in message
...
I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula
here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default How do I ask a cell to look only at the first character in a c

If you copy down the formula it will parse the first character
I am assuming you want to count A, H and V only if they are the first
character

A-LA41-09-92256

would be 1, correct?



--
Regards,

Peo Sjoblom


"soconfused" wrote in message
...
Can I get them separated? Like the A's in one row, the H's in another row
and so on?
--
DMM


"Peo Sjoblom" wrote:

You can't use the same cell, you would need a help cell

=IF(OR(LEFT(C2)="A",LEFT(C2)="H"),1,"")



--
Regards,

Peo Sjoblom



"soconfused" wrote in message
...
I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula
here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default How do I ask a cell to look only at the first character in a cell

in D1:

=if(OR(left(C1)="A",left(C1)="H"),1,"")

HTH

"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default How do I ask a cell to look only at the first character in a c

I didn't pose the question right. I should have said I have a column with
these variables and at the bottom, I want to sum all the A's, H's and V's.
--
DMM


"Toppers" wrote:

in D1:

=if(OR(left(C1)="A",left(C1)="H"),1,"")

HTH

"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default How do I ask a cell to look only at the first character in a c

Use a help column with a formula and extract the first character

=LEFT(C1)

copy down

assume you put that in D2:D50

then use

=SUM(COUNTIF(C2:C50,{"A","H","V"}))


otherwise try


=SUMPRODUCT(--(LEFT(C2:C50)={"A","H","V"}))


--
Regards,

Peo Sjoblom



"soconfused" wrote in message
...
I didn't pose the question right. I should have said I have a column with
these variables and at the bottom, I want to sum all the A's, H's and V's.
--
DMM


"Toppers" wrote:

in D1:

=if(OR(left(C1)="A",left(C1)="H"),1,"")

HTH

"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula
here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default How do I ask a cell to look only at the first character in a c

"Peo Sjoblom" wrote...
....
otherwise try

=SUMPRODUCT(--(LEFT(C2:C50)={"A","H","V"}))

....

Or try

=SUM(COUNTIF(C2:C50,{"A","H","V"}&"*"))

or a slightly shorter array formula in which it's easier to change the
letters sought,

=COUNT(FIND(LEFT(A1:A30,1),"AHV"))


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default How do I ask a cell to look only at the first character in a c

"Harlan Grove" wrote in message
...
=COUNT(FIND(LEFT(A1:A30,1),"AHV"))


That counts in empty cell in my XL97 because the FIND() returns 1 for empty
cells. Is this a bug that was fixed in later versions?
--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default How do I ask a cell to look only at the first character in a c

On Wed, 15 Aug 2007 12:08:05 -0700, soconfused
wrote:

I didn't pose the question right. I should have said I have a column with
these variables and at the bottom, I want to sum all the A's, H's and V's.


E1: A
E2: H
E3: V

F1: =COUNTIF(C:C,E1&"*")

Select F1:F3 and Fill Down (<ctrl-D)


--ron


  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default How do I ask a cell to look only at the first character in a cell

I posed the question wrong. What I really want is a sum of a column with the
first letter of every cell being the variable.

Thanks
--
DMM


"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default How do I ask a cell to look only at the first character in a c

=SUMPRODUCT(--(LEFT(C2:C50)="A"))

=SUMPRODUCT(--(LEFT(C2:C50)="H"))

=SUMPRODUCT(--(LEFT(C2:C50)="V"))




"soconfused" wrote:

I posed the question wrong. What I really want is a sum of a column with the
first letter of every cell being the variable.

Thanks
--
DMM


"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM

  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default How do I ask a cell to look only at the first character in a c

"Toppers" wrote...
=SUMPRODUCT(--(LEFT(C2:C50)="A"))

=SUMPRODUCT(--(LEFT(C2:C50)="H"))

=SUMPRODUCT(--(LEFT(C2:C50)="V"))

....

Urgh!

=COUNTIF(C2:C50,"A*")

=COUNTIF(C2:C50,"H*")

=COUNTIF(C2:C50,"V*")


  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default How do I ask a cell to look only at the first character in a cell

One more thing, I have this formula =IF(LEFT(H6:H7)="A",SUM(AW6:AW7),"") and
I am getting a value error. HELP please.

Thanks
--
DMM


"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM

  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default How do I ask a cell to look only at the first character in a c

Enter with Ctrl+Shift+Enter

"soconfused" wrote:

One more thing, I have this formula =IF(LEFT(H6:H7)="A",SUM(AW6:AW7),"") and
I am getting a value error. HELP please.

Thanks
--
DMM


"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM



  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default How do I ask a cell to look only at the first character in a c

I'm really sorry, I must be really dumb, but how do I do that?
--
DMM


"Toppers" wrote:

Enter with Ctrl+Shift+Enter

"soconfused" wrote:

One more thing, I have this formula =IF(LEFT(H6:H7)="A",SUM(AW6:AW7),"") and
I am getting a value error. HELP please.

Thanks
--
DMM


"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM

  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default How do I ask a cell to look only at the first character in a c

hold down the Ctrl and Shift keys and then hit Enter.

"soconfused" wrote:

I'm really sorry, I must be really dumb, but how do I do that?
--
DMM


"Toppers" wrote:

Enter with Ctrl+Shift+Enter

"soconfused" wrote:

One more thing, I have this formula =IF(LEFT(H6:H7)="A",SUM(AW6:AW7),"") and
I am getting a value error. HELP please.

Thanks
--
DMM


"soconfused" wrote:

I am trying to look at a cell and put a #1 in it:

Example Column C = A-LA41-09-92256 I need a formula here
to put a # 1 if the value is A- or H-

Thanks in advance.

DMM

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
If cell has any character typed in it cell curser moves to next c Form maker Excel Discussion (Misc queries) 1 December 18th 06 03:15 AM
Removing last character in a cell Megadrone Excel Worksheet Functions 0 November 30th 06 06:23 PM
more than 255 character in one cell javahar_s Excel Discussion (Misc queries) 1 March 29th 06 12:27 PM
How do I get a cell to show the fifth character of another cell? dedsky Excel Discussion (Misc queries) 1 December 29th 05 04:37 AM
Need a ZERO as the first character in a cell Mr_Jim New Users to Excel 2 November 1st 05 11:59 AM


All times are GMT +1. The time now is 05:25 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"