Formula correction

annadinesh

Board Regular
Joined
Mar 1, 2017
Messages
133
Office Version
  1. 2019
Platform
  1. Windows
Dear Experts

my below formula

Worksheets("EW").Range("C29").Formula = "=Concatenate(""Avail "",Y6, "" on EW Till "",Y7)"

Returns
Avail 0.1 on EW Till 45688


Note:
Y6 contains 10%
Y7 Contains Date

Please check and correct my formula.

Regards


Dinesh
 
Try:

VBA Code:
Worksheets("EW").Range("C29").Formula = "=Concatenate(""Avail "",TEXT(Y6,""#%""), "" on EW Till "",TEXT(Y7,""mm/dd/yyyy""))"
 
Last edited:
Upvote 0
Try:

VBA Code:
Worksheets("EW").Range("C29").Formula = "=Concatenate(""Avail "",TEXT(Y6,""#%""), "" on EW Till "",TEXT(Y7,""mm/dd/yyyy""))"
Dear Experts

Y6 = 7.5%

The Formula

=CONCATENATE("Avail ",TEXT(Y6,"#%"), " Discount on EW Till ",TEXT(Y7,"dd.mm.yyyy"))

returns

Avail 8% Discount on EW Till 31.01.2015
instead of
Avail 7.5% Discount on EW Till 31.01.2015
 
Upvote 0
=CONCATENATE("Avail ",TEXT(Y6,"0.0%"), " Discount on EW Till ",TEXT(Y7,"dd.mm.yyyy"))
 
Upvote 0
If you only want 1 decimal point to show and if that is 0 no decimals, then maybe:
Excel Formula:
=SUBSTITUTE(CONCATENATE("Avail ",TEXT(Y6,"0.0%"), " Discount on EW Till ",TEXT(Y7,"dd.mm.yyyy")),".0%","%")
 
Upvote 0

Forum statistics

Threads
1,226,831
Messages
6,193,206
Members
453,779
Latest member
C_Rules

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