Copy value only if condition meet

Closed
Report
Posts
17
Registration date
Thursday March 3, 2011
Status
Member
Last seen
July 20, 2011
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

I have a below table
1A 1B 1C 2A 2B 2C........31A 31B 31C ( Beginning with cell DN31,1A and ending with cell HB31,31C) .I would like to have that when the value in cellS D25,M25 and V25 match any of the value in the range of DN31 to HB31,which contain the value of 1A to 31C,it will copy and paste value only immediately below respective value of my table.

Example,
cell D25=4A (Range to be copy D28:D47) , cell M25=4B(Range to be copy M28:M47) and cell V25 = 4C(range to be copy V28:V47)

My table,
1A 1B 1C 2A 2B 2C 3A 3B 3C 4A 4B 4C................till 31A 31B 31C

so the value only(without formula) of range D28:D47 will be under 4A of the table,range M28:M47 under 4B and V28:V47 under 4C.

Can somebody help me put with the necessary VBA code and guide me.

Thanks.

3 replies

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Could you post some sample file on some shared site and then post back the link to the file back here
Posts
17
Registration date
Thursday March 3, 2011
Status
Member
Last seen
July 20, 2011

https://authentification.site/files/28987248/eFforT_NewTest-2.xls

I able to solve part of the problem,but another problem had occuer.That is whenever I change the date( in Sheet "B2JT"),the previously transfered data in sheet "DataKlm2" seems to dissapear only the current date data is available.
Example,
When I enter 2 in cell AS19 worksheet "B2JT" and than click the button "Transfer To Value Only DataKlm2"in worksheet "DataKlm" the data for date 1(cells E3,F3 and G3)dissapear.,only data for date 2 in cells H3,I3 and J3 is available.
Can you help me to directly transfer data(value only) from worksheet "DataKlm" to worksheet "DataKlm2" without clicking on the "Transfer To Value Only DataKlm2" button.My source data base is in sheet "SUPCSAKLM",selection was done by clicking radio button and check boxes.

Thanks .
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Sorry Azmi, I am not able to access Speedyshare. Could you post it to http://wikisend.com/ too and post back the link. I am sorry, I should have told u that in the first place.
Posts
17
Registration date
Thursday March 3, 2011
Status
Member
Last seen
July 20, 2011

It seem to be that I'm having problem with wikisend.HTTP 500 Internal Server Error had occuered.Is there any other share site which I can post the link?

Thanks
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
I was able to download your file. Before even addressing your issue, I have a question. I see you have a lot and I mean a lot of modules. Is there any reason that each module has just one routine ?
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Looking at the macro that is associated with your button "Transfer To Value Only DataKlm2" on sheet "DataKlm", basically it copies data in range B3:CS22 from sheet "DataKlm" and then paste it in range "C4:CT23 on sheet "DataKlm2". All previous data in range C4:CT23 is over written. What you would like to have ?

I am not too sure how to use your workbook. Could you give a step by step instructions on you you do it today and then how you would like to happen