Looking for a way to check if a cell contains "X" and if it does the replace it with the data from the cell in the same row column A. Ive searched the web and tested a few ways but nothing quite fits what im looking to do.
thanks in advance
Looking for a way to check if a cell contains "X" and if it does the replace it with the data from the cell in the same row column A. Ive searched the web and tested a few ways but nothing quite fits what im looking to do.
thanks in advance
Change the references and Offset to suit
Please Login or Register to view this content.
copy and pasted into a macro but i cant get it to change anything when i run it. The cells where X's will be placed randomly are e6:EH79. As each "X" is found it needs to copy the value of columnA from the same row into that cell.
thanks for your time
Try this on a copy of your workbook.
Not the most efficient code but until someone comes around that knows what they're doing, this might just help you for now.
Please Login or Register to view this content.
Thanks for the code. I copy and pasted this into the proper sheet and nothing happened. I also tried creating a macro of it and running it and still nothing happened. Not sure what im doing wrong here.
It works for me on a test sheet.
Are the X's in capitals or are they small x's?
Do they have a space in front or behind?
If any of the above, it won't work as it strictly looks for the X without spaces (front or back).
They are small x's. Ill try making them big X's and see if that works. No spaces are in the cells. Ill be back with the results. Thank you again
It works for me on a test sheet.
Are the X's in capitals or are they small x's?
Do they have a space in front or behind?
If any of the above, it won't work as it strictly looks for the X without spaces (front or back).
Glad it worked.
You could also change the X in the code to a small x if the entries in the sheet tend to be small x's.
Or, if need be, you can change the code so it works on both X and x.
Regards
John
If you want the code to work with both Upper case and Lower case,change this line
Please Login or Register to view this content.
to this
Please Login or Register to view this content.
HTH
John
i ended up writing code to change all the x's to X's then I ran your code. again I appreciate your time and help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks