cut and paste the cell value to a specific area and if there is a cell empty with macro RRS feed

  • Question

  • hi,

    I am trying to make a tool which should help me to keep an eye over our transportations . the File is here , what is should be able to do.

    1- in A1 you can see VON (from) there will be soll called a place where the container is standing then WbeH this is the container , Nach (To) so it can be another door or starting from I32 the palce so called Pool , i need a macro which checks the door Nr. from and CUT the value of WbeH and then the value TO if at target is another Door in Section A or Section B  there is  a vlaue then it should give the message return that door is already full, if in Pool area if there is any Cell Empty then it should Paste there , the Status is to set manually ,

    i hope i could explain my Problem and someone can Help me again .

    With best wishes

    Saturday, October 22, 2016 11:21 PM

All replies

  • Probably you need to give more detail.

    Assume WBEH is vehicle, 403 is it's present location, it should go to 55555. But what is "pool".

    In above line you need IF-THEN-ElSE structure. Put your sentences for each of them below clearly. ..I have given my assumption. Correct it as required....

    After clearly putting sentences for IF-THEN-ELSE, you specify INPUTs and OUTPUTs of Macro.

    For example "if at target is another" - What is "Target". Give cell adrees, what "Another Door" - Give Cell addreess. "it should give the message" - How give message. by message box or putting some value in one cell.


    IF - (if at target is another Door in Section A or Section B  there is  a vlaue)  AND (the door Nr. from)

    THEN - it should give the message return that door is already full

               CUT the value of WbeH and then the value TO

    ELSE - Not Specified


    IF - (if in Pool area) AND ( if there is any Cell Empty)

    THEN - then it should Paste there

    ELSE - Not Specified

    Best Regards,
    Asadulla Javed,
    Jadavpore & Asansol

    Sunday, October 23, 2016 4:10 AM
  • Hi Asadulla ,

    thank you for your reply, WbeH is container and 403 is a door , Pool Area is where Empty Containers or full containers are Parked ( ready to be loaded on trucks and move to final destinationation ) emty containers will be moved to the doors to fill them with materials.

    I have verry litte knowledge of Excel or VBA so the method you have explained i can't do much with it.

    Wednesday, October 26, 2016 4:53 PM
  • It is nothing to do with VBA or Excel. Whenever you will ask computer to do something, you will have to be explicit all time.

    Basically you want Excel to do something when some condition is met or not met.

    You need to specify the condition and the action which will be executed.

    Say I want A1 cell to be Cleared when B1 has value "a". I must tell computer that

    IF B1="a" THEN Range("A1").Clear

    In Earlier post I just wanted you to specify clearly what is condition and what is to be done when condition met.

    Best Regards,
    Asadulla Javed,
    Jadavpore & Asansol

    Thursday, October 27, 2016 4:58 AM
  • Hi,

    Do you resolve your issue?

    If not, I think your information now could not help us write a macro to meet your requirement.

    I suggest you share more detail steps like how do you manually do it.

    Besides, you could share the files or screenshots which are before and after the operation.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, November 2, 2016 7:20 AM