• 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.

Want to add multiple rows(with same formula and picture) through a button

Sumant

New Member
kindly find the attached macro excel file for your reference. When ever I am adding a new row all are working fine except the picture cell. Kindly help


Thanks and regards
Suman Tripathy
 

Attachments

  • Quotation - Ver2.0 - Copy.rar
    514.3 KB · Views: 1
I don't understand what your requirement is.
You want to add new row but what is the picture for?
Is there only 1 picture?
 
Dear Chirayu,
In my excel sheet2 A25 cell is a drop down. When ever you will select an item from A25 then corresponding items will be inserted in B25 dropdown.
If you select an item from B25 dropdown then corresponding picture will be fetched from Sheet1 and the price will be also fetched.
I need the same thing to be repeated in row number 26, 27 and so on by clicking the ADD Row button.
 
Hi:

Is this you looking for , change the product drop down the pictures will change accordingly.

Thanks
 

Attachments

  • Quotation - Ver2.0 - Copy.xlsm
    829.9 KB · Views: 1
I've attached a sample file I made based on your file. So that you can look at the code & modify accordingly. Will only work 1 row at a time.
 

Attachments

  • Sample.xlsm
    180.5 KB · Views: 0
Hi:

Is this you looking for , change the product drop down the pictures will change accordingly.

Thanks
Dear Nebu,
When I add a new row(By clicking the ADD ROW button) and select a different product the the picture is not changing in the second row (Since you have defined that picture as "=Test")
I require, the picture should change in every row as per the product selected from drop down.
For example
If I will select Row3--> Desking--> Arrive then arrive product picture will come
Then I want add 1 row through "ADD Row" Button
When I will click ADD Row Button it will add 1 more row i.e. Row 4
If I will select Row4--> Seating--> Monarch then Monarch product picture will come.
Kindly help
 
Hi:

I am not sure why you want a macro to add rows. I have done data validation for 7 items and the picture will change as per the drop down. You can have more rows depending on your needs. Find the attached.

Note: Go to the name range to understand the formula I have used to link the pictures.

I also had to delete lot of pictures from your sheet to reduce the size and upload. You can add the pictures at your end and it will work.

Thanks
 

Attachments

  • Quotation - Ver2.0.xlsb
    994.4 KB · Views: 0
Hi:

I am not sure why you want a macro to add rows. I have done data validation for 7 items and the picture will change as per the drop down. You can have more rows depending on your needs. Find the attached.

Note: Go to the name range to understand the formula I have used to link the pictures.

I also had to delete lot of pictures from your sheet to reduce the size and upload. You can add the pictures at your end and it will work.

Thanks
Dear Nebu,
I need 500 same kind of rows(My need will vary every time as per the items required). So I need a button for that which will prompt me; how many rows I want to insert. I have gone through your attached file. In that you have defined name for each picture like Test1, Test2...Test7.
So for 500 rows, if I will do the same it will take me a pretty long time.
 
Hi:

Find the attached. You do not need add row macro any more. You can add more data validation as you wish in the rows below. The macro will dynamically change the pictures. Do not delete the picture which is on the top you can move it to the end of the sheet if you do not want it to be seen. Test it out and let me know with questions if any.

Thanks
 

Attachments

  • Quotation - Ver2.0.xlsb
    399 KB · Views: 1
Hi:

Find the attached. You do not need add row macro any more. You can add more data validation as you wish in the rows below. The macro will dynamically change the pictures. Do not delete the picture which is on the top you can move it to the end of the sheet if you do not want it to be seen. Test it out and let me know with questions if any.

Thanks
Thank you very much Nebu...It's working fine.
But when ever I am changing the Quantity column(eg. In cell E11 if I will change the quantity from 1 to 5 then the picture is not showing) the picture is vanishing.
Also I am week in coding. Kindly suggest me any book or document so that I can learn how to write program in Excel

Thank you again for your valuable help
 
Hi:

I am not sure why that is happening at you end , at my end its working alright. I am not sure about any particular book which can assist you in learning VBA. I learned it from the sources in Internet. I guess you best bet is to research in internet and try doing it your own.

Thanks
 
Back
Top