• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Replace all pictures in a selected area with specific formatting

nick_jco

New Member
I get these crosswords online and paste them into Excel. The black spaces of the crossword come from the website as little pictures in each cell.
I previously posted this and was provided a VBA macro to use, but now that macro is not working since the website has changed how the little pictures appear.
Previous post -> https://chandoo.org/forum/threads/r...sheet-with-text-or-specific-formatting.53254/

So, I need a new macro that will replace all the picture in the sheet with specific formatting (black fill).
Example sheet is attached with a before and after.
Any help would be appreciated!
 

Attachments

  • Pics to Text.xlsm.xlsx
    16.3 KB · Views: 2
First change this thread title as according to your attachment there is no picture to replace,​
the reason why the original VBA procedure can't work anymore !​
Replace the attachment with the macro workbook or saved as binary format .xlsb …​
 
Anyway according to your attachment you can use this unique codeline : Sheets(1).UsedRange.Replace "#VALUE!", ChrW(9608) & ChrW(9608) …​
 
@Marc L on the 'before' tab, there are objects in the cells called Picture.
I'm not sure how to use your codeline you provided...
 

Attachments

  • Pics to Text.xlsm
    16.3 KB · Views: 1
Still no picture but just error values (characters) you can replace with the Excel Search / Replace feature whitout any VBA procedure !​
You can replace the original code with my post #3 codeline, use it the same way than before …​
 
Not sure what you're seeing, but in the saved attachment they are pictures. When you click on one, the cell contents show "Picture"
1711563280290.png
 
On my side on an elder Excel version there is no picture but '##' according to an error value,​
I have to find a computer with a more recent version just to be sure … Edit : the same under 365 version​
But as a reminder the original VBA procedure removes all pictures​
so when it does not work that means there is no picture within the worksheet.​
 
Back
Top