vba for converting results of a formula to text in a cell.

erutherford

Active Member
Joined
Dec 19, 2016
Messages
443
Can a cell that contains the results of a "formula" i.e. "report!$A$1", which displays the text "repaired", be automatically converted to text?

if so could a sample be shown.

thanks in advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

MattH1

Board Regular
Joined
Jul 15, 2016
Messages
174
Highlight the cell you want to have as a string (Cell G7 in this instance). Press Cntrl + C. Then Press Alt + E + S + V (not simultaneously, one after the other). This should change Cell G7 to say "repaired".

Please note that once you do this, the formula will be removed.
 
Last edited:
Upvote 0

erutherford

Active Member
Joined
Dec 19, 2016
Messages
443
Sheet1, cell C184 contains this function "=LOOKUP(B184,A13:A177,B13:B177 & C13:C177)". the function returns text. I'll click on the command button which copies this cell over to sheet2.
this is the code:
Sheets("sheet1").Range("A2:D7").Copy Destination:=Sheets("sheet2").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
The function in Sheet1 causes a "REF" error, so can I add anything to the copy function to convert to text?

thanks
 
Upvote 0

Forum statistics

Threads
1,195,712
Messages
6,011,266
Members
441,598
Latest member
chrispaulpearce

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
Top