When i am in cell sheet 1 create a macro button to copy same cell value to same cell in sheet 2 vba

stavrosiona

New Member
Joined
Apr 17, 2015
Messages
21
i am creating an excel worksheet to keep records according orders-deliveries and pending of my customers orders. It has 3 sheets (Order-Deliver i enter values manual, and pending sheet do the reduction from orders to deliver and shows the pending value)
I have a sheet 1 called pending orders. for example in cell b10 says pending 3 (which is basically a formula between sheet Orders- sheet Delivered). The sheet called orders which has in cell b10 value of 10 and sheet delivered had a value of 7 in cell b10. ( I have different values in different cells, so pending sheet shows the result of Order sheet-deliver sheet)

What i want to do is to create a button in the sheet of pending, so when i see that i.e in cell b10 are pending 3 pcs, when i can deliver 1 pcs then to press a button and basically add 1 pc in position b10 in sheet "deliver" so to change tha values from Deliver 7 to deliver 8 and then to make the calculation that pending left 2.
I search through the web, i found Range formulas e.t.c to do this but on all of then the vba has to have specific cell position for example to say: Range("DELIVERED!b10").Value = Range("DELIVERED!b10") + 1
I do not want to set b10, i want to read the active cell of cell i am in sheet 1(pending) and do the calculation for sheet Deliver for the same cell position.
So depends on what cell position i am in penging sheet to make the calculation on the same cell position in sheet Deliver.
Is this possible?
Thanks,
Savros.
 

yky

Well-known Member
Joined
Jun 7, 2011
Messages
1,477
In the example you give : Range("DELIVERED!b10").Value = Range("DELIVERED!b10") + 1, where is the info 1 stored? You don't want to manually enter that info, do you? Without knowing where that info is stored, a macro needs to invoke an input box to get that info.
 

Forum statistics

Threads
1,081,832
Messages
5,361,586
Members
400,639
Latest member
fleyd

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top