Slight change of formula

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

i need a slight change to my formula

=SUM(INDEX(Q15:Q138,MATCH("*Additions*",H15:H138,0)):Q138)

at the start of the sheet if nothing is entered it shows "#N/A" but i would like it to say "---"

Hope this makes sense

Thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi guys,

i need a slight change to my formula

=SUM(INDEX(Q15:Q138,MATCH("*Additions*",H15:H138,0)):Q138)

at the start of the sheet if nothing is entered it shows "#N/A" but i would like it to say "---"

Hope this makes sense

Thanks

On 2007 or later...
Code:
=IFERROR(SUM(INDEX(Q15:Q138,MATCH("*Additions*",H15:H138,0)):Q138),"---")

Otherwise:
Code:
=IF(ISNUMBER(MATCH("*Additions*",H15:H138,0)),
    SUM(INDEX(Q15:Q138,MATCH("*Additions*",H15:H138,0)):Q138),
    "---")
 
Upvote 0
Hi guys,

i need a slight change to my formula

=SUM(INDEX(Q15:Q138,MATCH("*Additions*",H15:H138,0)):Q138)

at the start of the sheet if nothing is entered it shows "#N/A" but i would like it to say "---"

Hope this makes sense

Thanks


Does this work?

=IF(ISERROR(SUM(INDEX(Q15:Q138,MATCH("*Additions*",H15:H138,0)):Q138)),"---",SUM(INDEX(Q15:Q138,MATCH("*Additions*",H15:H138,0)):Q138))
 
Upvote 0
Fantastic thanks Aladin, sorry John didnt see your solution at first

what about the same with

=SUM(T142-Q142)/T142

Thanks
 
Upvote 0
Thanks Aladin,

Forgot to mention that this cell is a percentage

so if those cells are showing " " can this cell show " "

Thanks
 
Upvote 0
Thanks Aladin,

Forgot to mention that this cell is a percentage

so if those cells are showing " " can this cell show " "

Thanks
Try...
Code:
=IF(N(T142), 
    IF(N(Q142), 
      (T142-Q142)/T142,
      ""),
    "")

Note. Not " ", which is a space char, rather "".
 
Upvote 0
Hi Aladin,

I have a real simple one

=SUM(Q146-Q142)

shows up #VALUE

How do i have that say "" instead of #VALUE

Thanks
 
Upvote 0
Many many thanks Aladin,

Just one more tho if you would be so kind

=SUMPRODUCT(--ISNUMBER(SEARCH(" Surcharge "," "&H15:H138&" ")),Q15:Q138)

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top