Can you splice a micro USB charging cable and turn it into a micro USB to micro USB cable so you can transfer data? I no longer have a computer only a tablet
USB charging cables typically do not have the data pins connected.
In fact there might only be two conductors (just for power) in the cable instead of the required four conductors for USB just to save on cost. (I have actually taken a USB charger apart.)
Whether you will be able to "transfer data" to/from your tablet depends on what you want to connect to your tablet and maintain the USB host-to-device hierarchy.
As is, you're asking an XY question.
No, you can't.
There's literally one specific scenario where this can work
You have a USB OTG adapter - which is not exactly the same as a USB micro adaptor. These are less than 2-3 dollars online, maybe a fiver if you get a fancy one.
One device is able to act as a host, and the other as the target.
That said, any attempts to splice your own from two cables without knowing these things will just result in 2 broken cables.
For extra fun - the quality of cables ranges broadly - from the cost engineered cables sawdust has mentioned. You're better off getting the USB OTG adaptor, and testing with a known good data capable cable over splicing a pair of perfectly good cables (or 2 terrible ones, or any mix of those).