Find and past button

_Fly_

Board Regular
Joined
Jan 6, 2012
Messages
87
a
b
c
d
e
f
g
h
i
1
Number
2
Item
3
Stock
4
Condition
5

<tbody>
</tbody>
Sheet Entrance

a
b
c
d
1
Number
Item
Stock
Condition
2
123456
Paper Case
100
New
3
234123
Chair
4
Used

<tbody>
</tbody>
Sheet Global

Hi my friends it's possible to help me on that issue?
I want to put a code on my button that appears on the Sheet Entrance that when i click appears a msgbox aske me for a number. Then i put the number and click ok, then the code searches on the sheet global for that code and if that number exists copy the interior of the correspondent cell on the column a, b, c and d to the Sheet entrance on the correspondent cells C1, C2, C3, C3. If the number doens't exists appear that info.

Example i click the button on the sheet Entrance and a msgbox appear ask me a number i insert the 234123 and click ok.
The code goes search for that number on A:A and finds on the A3 cell, so it copys the a3 value from Sheet Global to C1 Sheet Entrance, the b3 value from Sheet Global to the c2 Sheet Entrance, the c3 value from Sheet Global to the d3 Sheet Entrance, the d3 value from Sheet Global to the c4Sheet Entrance.

It's possible to give me any ideas to the code?
Regards
 
Howard your code is almost there but you go pick the Quantidade Retirada (removed amount) and this field must to remains empty it's to insert the amount of items i will remove then on the n10 cell i will put the formula =J10-F10 to calculate the amount of items after i remove from stock
The Inserir button picks the value calculated on the n10 and past to the Stock Actual cell on the Registos Globais Sheet

Example: if i pick 8 items from code 123 item (The stock initial was 10) after click on the insert button the 10 value on the G2 must to be changed to 2 (=10-8)
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Okay, you can delete this line from the code, and nothing will be put in cell F10 when you click the Button 5.

Code:
rngFnd.Offset(, 3).Copy Sheets("Saídas").Range("F10")

Anything else?

Howard
 
Upvote 0
Okay, you can delete this line from the code, and nothing will be put in cell F10 when you click the Button 5.

Code:
rngFnd.Offset(, 3).Copy Sheets("Saídas").Range("F10")

Anything else?

Howard

Howard please only help me with the other button the Inserir button
The Inserir button picks the value calculated on the n10 and past to the Stock Actual cell on the Registos Globais Sheet

Example: if i pick 8 items from code 123 item (The stock initial was 10) after click on the insert button the 10 value on the G2 must to be changed to 2 (=10-8)

Regards
 
Upvote 0
Howard you are the bes it's really works!
Just one more thing it's possible to make button Inserir to copy two more things to the Saidas sheet? I create a list starting on the Q5 (Saidas Sheet) with what i'm picking example:
When i click on the Inserir button on the column Q (starting at Q6) appears the F10 value and on the R6 the F8 value, after i search another item to pick up this new item will appear on Q7 an the name at Q8 (understand?)
After that when i click on button limpar that list will be deleted and i can create another pick up list.

The other question i have if it's possible to create a warning when i press the inserir button if the value on Stock Actual (Registos Globais) goes to the Stock minimo value or goes to zero. I also want to make not possible if the stock was 4 and i press to pick 10 a message tell me "you only can pick 4"

Best Regards
 
Upvote 0
Howard i have a problem with your code, everytime i click on the Procurar button the cells founded on the Registos Globais become totally copied and so i loose my blue squared cells it's possible to copy only the contents of the cells?
REgards
 
Upvote 0
I am having some problem understanding where the warning is to be done.

How do you "press to pick 10"? Do you enter 10 into cell F10 on Sheets("Saídas"). Is that how you pick the number required?


Code:
The other question i have if it's possible to create a warning when i press the inserir button if the value on Stock Actual (Registos Globais) goes to the Stock minimo value or goes to zero. I also want to make not possible if the stock was 4 and i press to pick 10 a message tell me "you only can pick 4"

I made some assumptions and have this for you to try.

https://www.dropbox.com/s/9ofyz47xza0r48q/Stock Materiais3.xlsm?dl=0

Howard
 
Upvote 0
Okay, the link in Post #18 does that along with a message box alerting you of stock amounts if the pick is more than the stocks available.

Does that work correctly for you?

Howard
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

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