need to show no decimal

sksanjeev786

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

I have data and I need 0 decimals in Delta column C,E,G,I (also kept the output in row 11 to 17

Please refer attached for ref :)

Book1
ABCDEFGHI
1DeltaDeltaDeltaDelta
2Unaided Brand Awareness (First Mention)11-2.4121.112-2.3111.5
3Unaided Brand Awareness (Any Mention)28-2.328-0.428-5.1 q28-1.3
4Aided Brand Awareness453.14613.9 p451.4456.8 r
5Online Ad Awareness210.22119.4 p200.5211.8
6Brand Favorability30-13014.9 p291.2294.8
7Consideration Intent281.12713.2 p270.6278.1 p
8Purchase Intent214.52115.0 p212.22110.5 p
9
10
11Unaided Brand Awareness (First Mention)11-212112-2112
12Unaided Brand Awareness (Any Mention)28-228028-5 q28-1
13Aided Brand Awareness4534614 p451457 r
14Online Ad Awareness2102119 p201212
15Brand Favorability30-13015 p291295
16Consideration Intent2812713 p271271
17Purchase Intent2152115p2122111 p
Sheet1



1680121697672.png
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Do you just want to not show the decimals or do you want to remove them from the value of the cell?

If the cell has 5.1 do you want to see 5 but still have 5.1 or have the value in the cell 5?

and considering rounding
If the cell has 5.5 do you want to see 5 but still have 5.5 or have the value in the cell 5?
OR
If the cell has 5.5 do you want to see 6 but still have 5.5 or have the value in the cell 6?

EXAMPLE 1 - leave the value in the call as whatever it is but show it as rounded to the nearest whole number
Example: if a cell has =51/10 the output will be 5.1. You can set the formatting to show no decimals and it will round the number. If you go into the cell with the value you want to show as rounded press Ctrl+1 and then set it to be Number with 0 decimal places. This will keep 5.1 in the cell but show 5. If the value was 5.5 or any number below 6.5 it would show 6 but keep the exact value.

1680135808179.png



If the value is calculated and you want to actually change 5.1 to be 5 you can round it down by using one of the round functions.

There are 3 similar functions you can use:
=ROUNDDOWN(yourvalue,0) would show 5.1 as 5 (and any value 5 or above but under 6 will give a result of 5)
=ROUNDUP(yourvalue,0) would show 5.1 as 6 (or any value above 5 up to and including 6 will result in 6)
=ROUND(yourvalue,0) would show 5.1 as 5 (and any value 5 or above but under 5.5 will show as 5, any value 5.5 AND under 6.5 will result in 6)
where yourvalue is 5.1 (or the calculation that gives 5.1) and the ,0 is to say "no decimal places"

Hope this helps
Craig
 
Upvote 0
Do you just want to not show the decimals or do you want to remove them from the value of the cell?

If the cell has 5.1 do you want to see 5 but still have 5.1 or have the value in the cell 5?

and considering rounding
If the cell has 5.5 do you want to see 5 but still have 5.5 or have the value in the cell 5?
OR
If the cell has 5.5 do you want to see 6 but still have 5.5 or have the value in the cell 6?

EXAMPLE 1 - leave the value in the call as whatever it is but show it as rounded to the nearest whole number
Example: if a cell has =51/10 the output will be 5.1. You can set the formatting to show no decimals and it will round the number. If you go into the cell with the value you want to show as rounded press Ctrl+1 and then set it to be Number with 0 decimal places. This will keep 5.1 in the cell but show 5. If the value was 5.5 or any number below 6.5 it would show 6 but keep the exact value.

View attachment 88665


If the value is calculated and you want to actually change 5.1 to be 5 you can round it down by using one of the round functions.

There are 3 similar functions you can use:
=ROUNDDOWN(yourvalue,0) would show 5.1 as 5 (and any value 5 or above but under 6 will give a result of 5)
=ROUNDUP(yourvalue,0) would show 5.1 as 6 (or any value above 5 up to and including 6 will result in 6)
=ROUND(yourvalue,0) would show 5.1 as 5 (and any value 5 or above but under 5.5 will show as 5, any value 5.5 AND under 6.5 will result in 6)
where yourvalue is 5.1 (or the calculation that gives 5.1) and the ,0 is to say "no decimal places"

Hope this helps
Craig
Hi Craig,

Thank you so much for your time on this.

I have tried to do the same but wherever I have 13.9 p it is not working for us can we have a VBA for this

Solution i have kept in row number 11 to 17 if we have 13.9 i need as 14 p and if we have 19.4 p i need as 19 p

Let me know if you need anything else on this.

Regards
Sanjeev
 
Upvote 0
Hi Craig,

Thank you so much for your time on this.

I have tried to do the same but wherever I have 13.9 p it is not working for us can we have a VBA for this

Solution i have kept in row number 11 to 17 if we have 13.9 i need as 14 p and if we have 19.4 p i need as 19 p

Let me know if you need anything else on this.

Regards
Sanjeev
Hi Team,

Can anyone help me on this with VBA Macro
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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