Changing the picture using macros

learnmore

New Member
Joined
Jun 28, 2012
Messages
28
Well this is a stupid question but I'm a beginner in using macros. So bear with me :) My objective is to change a picture in a cell depending on the previous cell for example

If the number at B1 is bigger than A1, a mouse(example only) must appear below. If B1<A1, an elephant(example) must appear below. Unfortunately, I do this manually and there are a lot of cells I need to change the picture.

Hope to get answers asap! thank you!
 
Last edited:

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I wasn't able to write the question fully. So here it is!

Well this is a stupid question but I'm a beginner in using macros. So bear with me. My objective is to change a picture in a cell depending on the previous cell for example

If the number at B1 is bigger than A1, a mouse(example only) must appear below. If B1<A1, an elephant(example) must appear below. Unfortunately, I do this manually and there are a lot of cells I need to change the picture.

Hope to get answers asap! Thank you!
 
Upvote 0
Thanks for replying Brad! I already watched the video. However, I didn't found my answer to my problem. I'm trying to find a way that changes the picture if the previous number (A1) is greater than B1 vice versa. In short, there are two pictures needed but only one picture must be shown at a cell.

ABC
1304020

<tbody>
</tbody>


In the example above, since B1 is greater than A1, a picture of a mouse must be shown below B1. On the other hand, since C1 is less than B1, a picture of an elephant must be shown below C1.

Hope that I cleared things out! Thanks!
 
Last edited:
Upvote 0
Hi Brad!

I used used the process in the video. However, when I use it in 30 cells, it gets slower. Do you know a way to solve the problem? Thanks for the help man!
 
Upvote 0
Perhaps you could try Bills VBA method. I tried a few things with this code and Calc at Manual but with many pictures on the sheet they all appear to Calculate and slow the process. Someone else may be able to shed some light?


Private Sub Worksheet_Change(ByVal Target As Range)

MYROW = Target.Row
MYNEXTROW = MYROW + 1

Range(Cells(MYROW, 1), Cells(MYNEXTROW, 3)).Calculate


End Sub
 
Upvote 0

Forum statistics

Threads
1,206,814
Messages
6,075,023
Members
446,114
Latest member
FadDak

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