#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
S S S S is offline
external usenet poster
 
Posts: 38
Default changing formula

This is my formula for adding up numbers in a column.

=SUM(IF(ISERR(FIND("-",J20:J137)),,REPLACE(J20:J137,1,FIND("-",J20:J137),"")-LEFT(J20:J137,FIND("-",J20:J137)-1)+1))

I have extended the length of the column to J20 to J183 as I now have more
entries, if I my manually change the J137 to J183 then the formula no longer
works.
Why is this? I dont understand the formula as it was done for me.

What am I doing wrong.

thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default changing formula

Make your alteration to the formula then with the cursor still in the formula
bar enter the new formula with:-

Ctrl+Shift+Enter

Mike

"S S" wrote:

This is my formula for adding up numbers in a column.

=SUM(IF(ISERR(FIND("-",J20:J137)),,REPLACE(J20:J137,1,FIND("-",J20:J137),"")-LEFT(J20:J137,FIND("-",J20:J137)-1)+1))

I have extended the length of the column to J20 to J183 as I now have more
entries, if I my manually change the J137 to J183 then the formula no longer
works.
Why is this? I dont understand the formula as it was done for me.

What am I doing wrong.

thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default changing formula

It is an array formula, which means that when you type it in or
subsequently edit it then you must use CTRL-SHIFT-Enter to commit it
rather than the usual Enter. If you do this correctly then Excel will
wrap the formula in curly braces { } when viewed in the formula bar -
you must not type these yourself.

Hope this helps.

Pete

On Aug 30, 8:18 am, "S S" wrote:
This is my formula for adding up numbers in a column.

=SUM(IF(ISERR(FIND("-",J20:J137)),,REPLACE(J20:J137,1,FIND("-",J20:J137),""*)-LEFT(J20:J137,FIND("-",J20:J137)-1)+1))

I have extended the length of the column to J20 to J183 as I now have more
entries, if I my manually change the J137 to J183 then the formula no longer
works.
Why is this? I dont understand the formula as it was done for me.

What am I doing wrong.

thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 747
Default changing formula

It's an array formula. It needs to be committed with Ctrl + Shift + Enter -
i.e. after making the changes, exit edit mode with this key combination.

Greg

"S S" wrote:

This is my formula for adding up numbers in a column.

=SUM(IF(ISERR(FIND("-",J20:J137)),,REPLACE(J20:J137,1,FIND("-",J20:J137),"")-LEFT(J20:J137,FIND("-",J20:J137)-1)+1))

I have extended the length of the column to J20 to J183 as I now have more
entries, if I my manually change the J137 to J183 then the formula no longer
works.
Why is this? I dont understand the formula as it was done for me.

What am I doing wrong.

thanks



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default changing formula

Actually, a quicker way to make the changes is to highlight the
cell(s) with the formula in and do Find & Replace (CTRL-H):

Find what: J137
Replace with: J183

then click Replace All. This way you do not need to use CSE as you are
not strctly editing the formula - it assumes that the formula works in
the first place.

Hope this helps.

Pete

On Aug 30, 9:25 am, Pete_UK wrote:
It is an array formula, which means that when you type it in or
subsequently edit it then you must use CTRL-SHIFT-Enter to commit it
rather than the usual Enter. If you do this correctly then Excel will
wrap the formula in curly braces { } when viewed in the formula bar -
you must not type these yourself.

Hope this helps.

Pete

On Aug 30, 8:18 am, "S S" wrote:



This is my formula for adding up numbers in a column.


=SUM(IF(ISERR(FIND("-",J20:J137)),,REPLACE(J20:J137,1,FIND("-",J20:J137),""**)-LEFT(J20:J137,FIND("-",J20:J137)-1)+1))


I have extended the length of the column to J20 to J183 as I now have more
entries, if I my manually change the J137 to J183 then the formula no longer
works.
Why is this? I dont understand the formula as it was done for me.


What am I doing wrong.


thanks- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default changing formula

This is my formula for adding up numbers in a column.

=SUM(IF(ISERR(FIND("-",J20:J137)),,REPLACE(J20:J137,1,FIND("-",J20:J137),"")-LEFT(J20:J137,FIND("-",J20:J137)-1)+1))

I have extended the length of the column to J20 to J183 as I now have more
entries, if I my manually change the J137 to J183 then the formula no
longer works.
Why is this? I dont understand the formula as it was done for me.

What am I doing wrong.


Because there is a range of cells being covered, you have an array
formula... you need to commit the formula using Ctrl+Shift+Enter. To do
this, select the cell **then** put the cursor into the formula bar... then
press Ctrl+Shift+Enter and the formula should work again.

Rick

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
S S S S is offline
external usenet poster
 
Posts: 38
Default changing formula

Thanks to all who answered, problem now sorted.
thanks for all your help.


"Rick Rothstein (MVP - VB)" wrote in
message ...
This is my formula for adding up numbers in a column.

=SUM(IF(ISERR(FIND("-",J20:J137)),,REPLACE(J20:J137,1,FIND("-",J20:J137),"")-LEFT(J20:J137,FIND("-",J20:J137)-1)+1))

I have extended the length of the column to J20 to J183 as I now have
more entries, if I my manually change the J137 to J183 then the formula
no longer works.
Why is this? I dont understand the formula as it was done for me.

What am I doing wrong.


Because there is a range of cells being covered, you have an array
formula... you need to commit the formula using Ctrl+Shift+Enter. To do
this, select the cell **then** put the cursor into the formula bar... then
press Ctrl+Shift+Enter and the formula should work again.

Rick



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
Changing a formula Donnas Excel Discussion (Misc queries) 4 May 16th 07 06:31 PM
how to edit formula without changing formula of each cell sadat Excel Worksheet Functions 2 April 24th 07 02:02 PM
Changing formula to a value newbie101 Excel Worksheet Functions 1 August 16th 06 02:19 PM
Copy Formula Down Without Changing Entire Formula roy.okinawa Excel Discussion (Misc queries) 3 March 16th 06 01:54 AM
Formula changing hookahbrain Excel Discussion (Misc queries) 3 January 19th 06 10:12 PM


All times are GMT +1. The time now is 10:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"