Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Reference absolute cell values

Hi -

I'm using the following formulas to count the number of specific
characters ($K$147) in a given cell and increment by 1:

In cell H74:
=IF($H$5=0,0,(LEN($H$5)-LEN(SUBSTITUTE($H$5,$K$147,""))+1))
In cell I74:
=IF($I$5=0,0,(LEN($I$5)-LEN(SUBSTITUTE($I$5,$K$147,""))+1))

The problem is if a user CUTS the data in cell H5 and pastes it into
cell I5, then the formula in cell I74 fails as follows:
=IF(#REF!=0,0,(LEN(#REF!)-LEN(SUBSTITUTE(#REF!,$K$147,""))+1))

I've tried using the INDIRECT command to create a reference table of
the values in H74 & I74 but the character in cell $K$147 is a Carriage
Return which INDIRECT doesn't seem to recognize.

Any ideas would be welcome. Apologies in advance if this isn't clear.

Eric
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Reference absolute cell values

Try it like this:

=IF(INDIRECT("I5")=0,0,(LEN(INDIRECT("I5"))-LEN(SUBSTITUTE(INDIRECT("I5"),$K$147,""))+1))

That will *always* refer to I5

--
Biff
Microsoft Excel MVP


wrote in message
...
Hi -

I'm using the following formulas to count the number of specific
characters ($K$147) in a given cell and increment by 1:

In cell H74:
=IF($H$5=0,0,(LEN($H$5)-LEN(SUBSTITUTE($H$5,$K$147,""))+1))
In cell I74:
=IF($I$5=0,0,(LEN($I$5)-LEN(SUBSTITUTE($I$5,$K$147,""))+1))

The problem is if a user CUTS the data in cell H5 and pastes it into
cell I5, then the formula in cell I74 fails as follows:
=IF(#REF!=0,0,(LEN(#REF!)-LEN(SUBSTITUTE(#REF!,$K$147,""))+1))

I've tried using the INDIRECT command to create a reference table of
the values in H74 & I74 but the character in cell $K$147 is a Carriage
Return which INDIRECT doesn't seem to recognize.

Any ideas would be welcome. Apologies in advance if this isn't clear.

Eric



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Reference absolute cell values

On Feb 8, 10:24*pm, "T. Valko" wrote:
Try it like this:

=IF(INDIRECT("I5")=0,0,(LEN(INDIRECT("I5"))-LEN(SUBSTITUTE(INDIRECT("I5"),$*K$147,""))+1))

That will *always* refer to I5

--
Biff
Microsoft Excel MVP

wrote in message

...



Hi -


I'm using the following formulas to count the number of specific
characters ($K$147) in a given cell and increment by 1:


In cell H74:
=IF($H$5=0,0,(LEN($H$5)-LEN(SUBSTITUTE($H$5,$K$147,""))+1))
In cell I74:
=IF($I$5=0,0,(LEN($I$5)-LEN(SUBSTITUTE($I$5,$K$147,""))+1))


The problem is if a user CUTS the data in cell H5 and pastes it into
cell I5, then the formula in cell I74 fails as follows:
=IF(#REF!=0,0,(LEN(#REF!)-LEN(SUBSTITUTE(#REF!,$K$147,""))+1))


I've tried using the INDIRECT command to create a reference table of
the values in H74 & I74 but the character in cell $K$147 is a Carriage
Return which INDIRECT doesn't seem to recognize.


Any ideas would be welcome. Apologies in advance if this isn't clear.


Eric- Hide quoted text -


- Show quoted text -


Solution worked great. Thanks for the help.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Reference absolute cell values

Solution worked great. Thanks for the help.

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


wrote in message
...
On Feb 8, 10:24 pm, "T. Valko" wrote:
Try it like this:

=IF(INDIRECT("I5")=0,0,(LEN(INDIRECT("I5"))-LEN(SUBSTITUTE(INDIRECT("I5"),$*K$147,""))+1))

That will *always* refer to I5

--
Biff
Microsoft Excel MVP

wrote in message

...



Hi -


I'm using the following formulas to count the number of specific
characters ($K$147) in a given cell and increment by 1:


In cell H74:
=IF($H$5=0,0,(LEN($H$5)-LEN(SUBSTITUTE($H$5,$K$147,""))+1))
In cell I74:
=IF($I$5=0,0,(LEN($I$5)-LEN(SUBSTITUTE($I$5,$K$147,""))+1))


The problem is if a user CUTS the data in cell H5 and pastes it into
cell I5, then the formula in cell I74 fails as follows:
=IF(#REF!=0,0,(LEN(#REF!)-LEN(SUBSTITUTE(#REF!,$K$147,""))+1))


I've tried using the INDIRECT command to create a reference table of
the values in H74 & I74 but the character in cell $K$147 is a Carriage
Return which INDIRECT doesn't seem to recognize.


Any ideas would be welcome. Apologies in advance if this isn't clear.


Eric- Hide quoted text -


- Show quoted text -


Solution worked great. Thanks for the help.


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
absolute cell reference macro rk0909 Excel Discussion (Misc queries) 4 November 7th 09 12:37 AM
What is the key shortcut for absolute cell reference? RM in Augusta Excel Discussion (Misc queries) 4 August 11th 06 06:01 PM
How do I create charts having non absolute reference values? rvboxel Charts and Charting in Excel 1 May 19th 06 01:13 PM
absolute cell reference A spreadsheet cell reference that does no help Excel Discussion (Misc queries) 1 January 18th 06 06:56 PM
Absolute Cell Reference Joshua K Briley Excel Discussion (Misc queries) 5 December 27th 05 06:32 PM


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