Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mikeice
 
Posts: n/a
Default Counting char help


I currently have a cell with formula
=IF(E10="","","Characters")

So it returns the number of characters input in cell -

=IF(B11="","",IF(B11255,"PLEASE GO BACK TO E10 and
PUT IN AN ALT ENTER",""))

What I want is either the amount of characters between the Alt Enters
or if the alt enters are inserted and the text is less than 255 between
those returns that the message doesn't appear.

is that possibel?




--
Mikeice
------------------------------------------------------------------------
Mikeice's Profile: http://www.excelforum.com/member.php...o&userid=22467
View this thread: http://www.excelforum.com/showthread...hreadid=393600

  #2   Report Post  
KL
 
Posts: n/a
Default

Hi Mikeice,

Try this ARRAY formula (has to be confirmed by Ctrl+Shift+Enter, not just
Enter):

=IF(OR((LARGE((MID(A1&CHAR(10),ROW(INDIRECT("1:"&L EN(A1)+1)),1)=CHAR(10))*ROW(INDIRECT("1:"&LEN(A1)+ 1)),ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))+1)))-LARGE((MID(A1&CHAR(10),ROW(INDIRECT("1:"&LEN(A1)+1 )),1)=CHAR(10))*ROW(INDIRECT("1:"&LEN(A1)+1)),1+RO W(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))+1))))255),"PLEASE
GO BACK TO "&CELL("address",A1)&" and PUT IN AN ALT ENTER","")

Unfortunately, adding another IF, which would check if A1 is empty, would
excede the 7 levels of functions nesting. So if you really need that you
could use two cells say:

(this one is array entered)
[B1]
=OR((LARGE((MID(A1&CHAR(10),ROW(INDIRECT("1:"&LEN( A1)+1)),1)=CHAR(10))*ROW(INDIRECT("1:"&LEN(A1)+1)) ,ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))+1)))-LARGE((MID(A1&CHAR(10),ROW(INDIRECT("1:"&LEN(A1)+1 )),1)=CHAR(10))*ROW(INDIRECT("1:"&LEN(A1)+1)),1+RO W(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))+1))))255)

[C1] =IF(ISERROR(B1],"",IF(B1,"PLEASE GO BACK TO "&CELL("address",A1)&" and
PUT IN AN ALT ENTER",""))

Regards,
KL


"Mikeice" wrote in
message ...

I currently have a cell with formula
=IF(E10="","","Characters")

So it returns the number of characters input in cell -

=IF(B11="","",IF(B11255,"PLEASE GO BACK TO E10 and
PUT IN AN ALT ENTER",""))

What I want is either the amount of characters between the Alt Enters
or if the alt enters are inserted and the text is less than 255 between
those returns that the message doesn't appear.

is that possibel?




--
Mikeice
------------------------------------------------------------------------
Mikeice's Profile:
http://www.excelforum.com/member.php...o&userid=22467
View this thread: http://www.excelforum.com/showthread...hreadid=393600



  #3   Report Post  
Mikeice
 
Posts: n/a
Default


THanks for that but all I get is an error #NUM
What am I doing wrong?


--
Mikeice
------------------------------------------------------------------------
Mikeice's Profile: http://www.excelforum.com/member.php...o&userid=22467
View this thread: http://www.excelforum.com/showthread...hreadid=393600

  #4   Report Post  
KL
 
Posts: n/a
Default

You are probably not confirming the formula with Ctrl+Shift+Enter

KL


"Mikeice" wrote in
message ...

THanks for that but all I get is an error #NUM
What am I doing wrong?


--
Mikeice
------------------------------------------------------------------------
Mikeice's Profile:
http://www.excelforum.com/member.php...o&userid=22467
View this thread: http://www.excelforum.com/showthread...hreadid=393600



  #5   Report Post  
Mikeice
 
Posts: n/a
Default


Stupid me!
I was using the tick and tehn alt enter

Thanks so much guys!


You all really ROCK!!!

thanks :) :)


--
Mikeice
------------------------------------------------------------------------
Mikeice's Profile: http://www.excelforum.com/member.php...o&userid=22467
View this thread: http://www.excelforum.com/showthread...hreadid=393600



  #6   Report Post  
KL
 
Posts: n/a
Default

Hi,

Just not to keep this in the box - Hector Migel Orozco Dias, an Excel MVP,
who, I believe, mainly contributes in the Spanish NG has proposed an
enhancement to the formula which is greatly appreciated:

1) define a name [e.g. CRLF] with the formula =CHAR(10)
2) in the main formula substitute all ocurrences of the funcion CHAR by the
defined name
3) now you can nest another IF...:

=IF(A1="","",IF(OR((LARGE((MID(A1&CRLF,ROW(INDIREC T("1:"&LEN(A1)+1)),1)=CRLF)*ROW(INDIRECT("1:"&LEN( A1)+1)),ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE(A1,CRLF,""))+1)))-LARGE((MID(A1&CRLF,ROW(INDIRECT("1:"&LEN(A1)+1)),1 )=CRLF)*ROW(INDIRECT("1:"&LEN(A1)+1)),1+ROW(INDIRE CT("1:"&LEN(A1)-LEN(SUBSTITUTE(A1,CRLF,""))+1))))255),"PLEASE
GO BACK TO "&CELL("address",A1)&" and PUT IN AN ALT ENTER",""))

Regards,
KL


"Mikeice" wrote in
message ...

Stupid me!
I was using the tick and tehn alt enter

Thanks so much guys!


You all really ROCK!!!

thanks :) :)


--
Mikeice
------------------------------------------------------------------------
Mikeice's Profile:
http://www.excelforum.com/member.php...o&userid=22467
View this thread: http://www.excelforum.com/showthread...hreadid=393600



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
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
edit out ascii char 09 rugbyba Excel Worksheet Functions 1 June 8th 05 11:15 PM
Counting names in a column but counting duplicate names once TBoe Excel Discussion (Misc queries) 9 May 11th 05 11:24 PM
Counting... Patrick G Excel Worksheet Functions 3 February 23rd 05 10:05 PM
Back Dating (Counting Backwards) Aviator Excel Discussion (Misc queries) 5 February 9th 05 06:55 PM


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