Formatting Data

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,587
Office Version
  1. 2021
Platform
  1. Windows
I have a workfile where a have used concatenating , right & Mid functions , but the result shows 9 Months YTD 39234
9 Month YTD 38991

See Attached saple files. The first file shows the incorrect values, the second file has been ranged valued to show what it must look like.

It would be appreciated if you would amend my formulas in the first file and advise
Data1.xls
ABCDEFGH
1CurrentMonthandYear9MonthsYTD39234CurrentMonthJune2007/4PrevYearJune20069
2PreviousQuarter9MonthYTD38991StartPeriodOctober20062005/StartPeriodPrevYearOctober2005/
YTD 2007
Book2
ABCDEFGH
1CurrentMonthandYear9MonthsYTD2007CurrentMonthJune20072006/2007PrevYearJune20069
2PreviousQuarter9MonthYTD2006StartPeriodOctober20062005/2006StartPeriodPrevYearOctober2005/
3TotalNetProfitTotalNetProfitOctober2006toJune2007TotalNetProfitOctober2005toJune2006%Increase/(Decrease)GroupShare2006/2007GroupShare2005/2006
Sheet1
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
The cell D1 is a date reference, replace your reference to D1 with :-

Code:
TEXT(D1,"MMMM YYYY")
 
Upvote 0
Hi Thorin

Thanks for the reply

I need to change the formula in B1 which 9 Months YTD 39234 . It should show 9 Months YTD June 2007

B2 shows 9 Month YTD 38991 9 Months YTD 39234 and should show 9 Months YTD June 2006



The formula in B1 is =IF(H1 = 1, H1&" Month YTD "&(RIGHT(D1,6)&""),H1&" Months YTD "&(RIGHT(D1,6)&""))

The formula in B2 is =IF(H1>3,""&(LEFT(B1,2))&"Month YTD "&(RIGHT(D2,5))&"",""&(LEFT(B1,2))&"Months YTD "&(RIGHT(G2,5))&""

It would be appreciated if you would amend these formula and advise

Howard


See Sample Data attached
Data1.xls
ABCDEFGH
1CurrentMonthandYear9MonthsYTD39234CurrentMonthJune2007/4PrevYearJune20069
2PreviousQuarter9MonthYTD38991StartPeriodOctober20062005/StartPeriodPrevYearOctober2005/
YTD 2007
 
Upvote 0
Enter the following in cell B1 :-

Code:
=IF(H1 = 1, H1&" Month YTD "&(TEXT(D1,"MMMM YYYY")&""),H1&" Months YTD "&(TEXT(D1,"MMMM YYYY")&""))

Is this what you were after ?
 
Upvote 0
Hi Andy

Thanks very much for the help. Code working perfectly

Regards

Howard
 
Upvote 0

Forum statistics

Threads
1,222,028
Messages
6,163,477
Members
451,838
Latest member
DonSlayer

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