VBA: Is there a way to use an image in the formula in VBA?

datastudent

Board Regular
Joined
Sep 7, 2021
Messages
87
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have this data where a circle is used to identify yes or no. In regular excel formula I can copy ang paste the image inside the formula but in VBA the image is not recognized. If its not possible, please give me suggestions on how I can work around it. Thank you!

In here the circle image turn into a question mark.
Range("L2").FormulaR1C1 = "=IF(RC[-4]=""?"",""N"",""Y"")"

Template_v1.xlsm
HIJKL
1EMSPortability
2N
3
iBASIS_IIS
Cell Formulas
RangeFormula
L2L2=IF(H2="○","N","Y")
 
I have no idea. I took it that you were trying to use code and that was your problem.

If you're using vba you don't need a formula?
If I don't use a formula, how do I convert the circles into word format in VBA?
 
Upvote 0
What is "word format", Microsoft Word format? Probably not. I think you're asking how to make use of the code example I gave you in post 2.
Then you need an event to trigger that code to run and that will depend on how you want to interact with the sheet. One option would be to double click the cell which would run beforedoubleclick event and insert the character. If you need different characters then you'll need to handle it differently. One idea might be to enter a particular character (e.g. numbers - 1 for black circle, 2 for white circle, nothing for some other character, and so on). Then when the code runs it first checks what's in the cell and acts accordingly. Again, it all depends on what you want in the cell and how you want to make it go there.
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

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
Back
Top