FORMULA TO PASTE SPECIAL (VALUE)

meppwc

Well-known Member
Joined
May 16, 2003
Messages
626
Office Version
  1. 365
Platform
  1. Windows
I have a formula in B2, =LEFT(A2,FIND(CHAR(1),SUBSTITUTE(A2,".",CHAR(1),3))-1) that returns 10.13.126. This works as it should.
In C1 I need a formula that populates with 10.13.126. This would be the equivalent of manually copying from B2 and selecting Special - Value.
Is there such a formula?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
No, a cell can either have a formula or a hard-coded value in it, but never both at the same time.
And one cannot automatically change to the other without the use of VBA.
So if you do not want to do that manually, the only way to convert it is to use VBA.

I am curious though - why does it need to be hard-coded?
Why is it a problem for the formula to return the value?
Are the underlying values used in the formula changing (i.e. cell A2), and you want to retain the original value?
 
Upvote 0
My reason for this is because I want to convert 10.13.126 to 10.13.126.1-254, by using =C1&".1-254"
 
Upvote 0
You don't need to convert it to hard-coded formula. Just add that piece on to the end of what you have now, i.e.
Rich (BB code):
=LEFT(A2,FIND(CHAR(1),SUBSTITUTE(A2,".",CHAR(1),3))-1)&".1-254"

or just reference the cell that has the first part of that formula, i.e.
Rich (BB code):
=B2&".1-254"
 
Upvote 0
Solution
Oh......that was a simple fix..........thanks Joe4
 
Upvote 0
You are welcome.

Yep, it doesn't matter if the value is hard-coded or derived from a formula, both can be used in other formulas.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

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