Need to add +,-

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
884
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team,

I have pulled the data with the formula
and I would like to add + or - if we have a positive number (+), negative (-) in the below formula

and for 0 no symbole. (data are in decimals )

=IF(INDEX(INDIRECT("'"&$A5&$B5&"'!A"&$C5&":IV"&$D5&""),MATCH($E5,INDIRECT("'"&$A5&$B5&"'!A"&$C5&":A"&$D5&""),0),H$2)*100>1&"+",INDEX(INDIRECT("'"&$A5&$B5&"'!A"&$C5&":IV"&$D5&""),MATCH($E5,INDIRECT("'"&$A5&$B5&"'!A"&$C5&":A"&$D5&""),0),H$2)*100)
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
can you give some examples of the result that you get

will the numbers returned be negative
so if you need a + in front of positive numbers you can format

custom format

+0;-0;0

not sure if XL2BB works for formatting
but here it is

Book6
A
1+1
2+2
3+3
4+4
50
60
7-1
8-2
9-3
Sheet1
 
Upvote 0
can you give some examples of the result that you get

will the numbers returned be negative
so if you need a + in front of positive numbers you can format

custom format

+0;-0;0

not sure if XL2BB works for formatting
but here it is

Book6
A
1+1
2+2
3+3
4+4
50
60
7-1
8-2
9-3
Sheet1

HI Etaf,

Thanks for your time on this

Here is my data and in H5 i am getting -0 due to decimal score in cell

FS.xlsm
BCDEFGH
5Brand Metrics116Unaided Brand Awareness 98-0
6Brand Metrics116Aided Brand Awareness 9396+2
7Brand Metrics116Message Association1720+3
8Brand Metrics116Consideration Intent 4559+14
9Brand Metrics116Aided Brand Awareness 9396+2
10Brand Metrics116Total Ad Recall4559+13
Sheet1
Cell Formulas
RangeFormula
F5:H10F5=INDEX(INDIRECT("'"&$A5&$B5&"'!A"&$C5&":IV"&$D5&""),MATCH($E5,INDIRECT("'"&$A5&$B5&"'!A"&$C5&":A"&$D5&""),0),F$2)*100
D5:D10D5=MATCH($A$1,INDIRECT("'"&$A5&$B5&"'!A:A"),0)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H5:H15Expression=I5="p"textNO
H5:H15Expression=I5="q"textNO
H5:H15Expression=I5="r"textNO
 
Upvote 0
what + - range would you consider as zero ?
you could add another part to the IF
do all the numbers have a decimal and are you just displaying without decimals ?
you could use TRUNC() , INT() , Round() ,Roundup() , Rounddown()

Just depends on how that impacts all the numbers for you and if using elsewhere
 
Upvote 0
what + - range would you consider as zero ?
you could add another part to the IF
do all the numbers have a decimal and are you just displaying without decimals ?
you could use TRUNC() , INT() , Round() ,Roundup() , Rounddown()

Just depends on how that impacts all the numbers for you and if using elsewhere


Thanks for the clarification sure will use the above function

here is the Zero data I have in excel
-0.403298031010706%
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,215,237
Messages
6,123,800
Members
449,127
Latest member
Cyko

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