manipulate text, must be simple :)

rplim2016

Board Regular
Joined
Jun 28, 2016
Messages
76
Hello Excel Guru's,

Simple problem in VBA:

code:
x = range("A1").value 'example, the value of A1 is 'Source DATA'!, the value of A1 is variable but always contain ' & '! in the beginning and end


question:
how can I modify the x inside the VBA, is there a way to make the x = Source DATA using text manipulation inside the VBA? like mid, len, search.. so I can customize it.

thanks a lot!
 
Last edited:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
When you look at the cell (not the Formula Bar) the above value is in, do you see the leading apostrophe or not?

Hello Rick, the formula for A1 is ="'Source DATA'!" but the visible in spreadsheet is 'Source Data'!, how can we remove and retain the wordings only?
 
Upvote 0
Hello Rick, the formula for A1 is ="'Source DATA'!" but the visible in spreadsheet is 'Source Data'!, how can we remove and retain the wordings only?
Try this code line...

x = Mid(Range("A1").Value, 2, Len(Range("A1").Value) - 4)
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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