Hi
I'm trying to insert a formula using the following VBA but it's not working.
Any ideas as to where the error is please.Please Login or Register to view this content.
Thanks in advance
Hi
I'm trying to insert a formula using the following VBA but it's not working.
Any ideas as to where the error is please.Please Login or Register to view this content.
Thanks in advance
Last edited by jeffreybrown; 02-26-2017 at 05:32 PM. Reason: Use code tags please!
Hello
It is working well for me
What is the text is C8 cell?Please Login or Register to view this content.
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
One thing to try...
- Place the formula in a worksheet cell
- Turn on the macro recorder
- Select F2
- Select tab
- Turn off recorder
Now the formula will be recorded in VBA with the proper syntax; however, it will be recorded as R1C1 notation, but just change the R1C1 to the regular C8 reference
HTH
Regards, Jeff
Thankyou
I see where it went wrong and it's working fine now but I am having trouble with the following now.
It returns VALUE instead of trimming A8Please Login or Register to view this content.
Last edited by jeffreybrown; 02-26-2017 at 05:48 PM.
I used this :
Note: there are no spaces before or after the hyphen ""-""Please Login or Register to view this content.
I also formatted the cells as TEXT.
Is this what you are after ?
Hi
Thanks for your help
Sample below if this helps explain
Why are you using +0 in the Formula?
Formula:Please Login or Register to view this content.
Please consider:
Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
Did you look at the solution offered in post #5?
Works for me with using that solution in-place of your current substitute.
Actually, convert Column A to number and then use...
Now you don't need the TrimPlease Login or Register to view this content.
Last edited by jeffreybrown; 02-26-2017 at 06:06 PM.
Hi Winon
The +0 converts the texts in column S to texts. The formula in C6 wouldn't work with out it due the trimmed data I believe.
@MarvinP helped me with it.
I'm very new to all this , just trying to make my job easier and learn along the way
On second thought...
Please Login or Register to view this content.
Does this help ?
Sorry ... slightly confusing me now.
Do I need spaces before and after ""-"" or not need spaces. If the latter, I think that's how it is already
I don't really understand the Dim LR parts if I'm completely honest either. So sorry to be a pain
Neither one works for me!
Both;
Formula:Please Login or Register to view this content.
Returns a "#Value!" Error!
So it seems to be working now. For some reason like @Logit suggested there were spaces before and after the ""-"". After I removed these it now will insert the Trim formula. Fluke on my part but its working at the mo
Thankyou all for your help and input
Great ! Good job.
Thanks.
Like I said I am very new to this and it does become quite daunting at times but little bits are becoming clearer the more I try, but I would be absolutely stuck with out the help you get from people on this forum
Thankyou all
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks