Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Sum and subtract columns when one cell contains preceding text

I need to add columns: A1=JA1098027 and B1=6, then subtract C1=1. All of
column A contains 1-3 letters preceding the number so nothing I've tried
works. Columns B and C are numeric only. Anyone know the secret formula for
this one? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Sum and subtract columns when one cell contains preceding text

K Tuck wrote:
I need to add columns: A1=JA1098027 and B1=6, then subtract C1=1. All of
column A contains 1-3 letters preceding the number so nothing I've tried
works. Columns B and C are numeric only. Anyone know the secret formula for
this one? Thanks.



This array formula (commit with CTRL+****+ENTER) should give you the correct answer:

=MID(A1,MATCH(1,--NOT(ISERROR(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)* 1)),0),LEN(A1))+B1-C1
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Sum and subtract columns when one cell contains preceding text

Hi,

Do you want to keep the leading letters in the end result?

Mike

"K Tuck" wrote:

I need to add columns: A1=JA1098027 and B1=6, then subtract C1=1. All of
column A contains 1-3 letters preceding the number so nothing I've tried
works. Columns B and C are numeric only. Anyone know the secret formula for
this one? Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum and subtract columns when one cell contains preceding text

Yes.

"Mike H" wrote:

Hi,

Do you want to keep the leading letters in the end result?

Mike

"K Tuck" wrote:

I need to add columns: A1=JA1098027 and B1=6, then subtract C1=1. All of
column A contains 1-3 letters preceding the number so nothing I've tried
works. Columns B and C are numeric only. Anyone know the secret formula for
this one? Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Sum and subtract columns when one cell contains preceding text

By the way, Mike H's suggested formula did not work. It results in #N/A so
anything you can suggest is very much appreciated. Thanks.

"K Tuck" wrote:

Yes.

"Mike H" wrote:

Hi,

Do you want to keep the leading letters in the end result?

Mike

"K Tuck" wrote:

I need to add columns: A1=JA1098027 and B1=6, then subtract C1=1. All of
column A contains 1-3 letters preceding the number so nothing I've tried
works. Columns B and C are numeric only. Anyone know the secret formula for
this one? Thanks.

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
conditional formatting dependent of preceding cell Beth W Excel Discussion (Misc queries) 1 August 19th 09 05:58 PM
fill cell with colour if preceding cell is a negative value POP Excel Discussion (Misc queries) 4 April 27th 09 05:35 PM
How do I reference a cell to another in the preceding worksheet karl.sonja Excel Worksheet Functions 8 August 6th 08 10:31 PM
Subtract text in one cell from another? BigIan Excel Worksheet Functions 3 July 7th 05 09:21 AM
Pivot Table Creating New Columns that Subtract Two Existing Columns den4673 Excel Discussion (Misc queries) 3 December 17th 04 01:31 PM


All times are GMT +1. The time now is 08:49 AM.

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"