Send value from one sheet to another with a button, but matching some criteria

mat3usPT

New Member
Joined
Aug 2, 2021
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hey Guys how are you?
I'm looking for a VBA solution for this problem
I have a button and want it to pass a value to another sheet and store it there. So when I erase the "slotstream" sheet, the highscore value remains on the databate "slots" sheet.
I don't have any VBA knowlage, but it should do something like a Vlookup right?
Hope this visual presentation helps

Then I replicate the same for the x button.

Thanks in advance for your time.

ff0b6617d51c35ea0c5fc7229791c097.png

5814a0bd5375d67c194471e23230bd5c.png
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
On your "SlotStream" sheet, how is the name to be compared found? Do you select Range("B2") or Range("Q2")?
I assume that your picture is wrong because of the "Oulaws Inc" and "Outlaw" being highlighted. These are different values.
 
Upvote 0
On your "SlotStream" sheet, how is the name to be compared found? Do you select Range("B2") or Range("Q2")?
I assume that your picture is wrong because of the "Oulaws Inc" and "Outlaw" being highlighted. These are different values.
Sorry you are right, it should match the same name, i marked it wrong on the screenshot.
Answering to your question, I have a vba code that when I click on cell in column B on sheet "slotstream" it copies that value to Q2, so we have two options:

- I want the button to work with the reference from Q2 to lookup the process as I said in the post
- When I have a Highscore, I can double click the cell on column J directly and it sends that value to the "slots" sheet with the same lookup method

Thank you for your attention.
 
Upvote 0
Try so on a copy of your original fist.
Change references if required.
Code:
Sub Maybe()
Dim sh1 As Worksheet, sh2 As Worksheet
Set sh1 = Worksheets("SlotStream")
Set sh2 = Worksheets("Slots")
On Error GoTo SomethingIsWrong
    sh2.Columns(1).Find(sh1.Cells(2, 17), , , 1).Offset(, 1).Value = sh1.Cells(2, 17).Offset(, -7).Value
Exit Sub
SomethingIsWrong: MsgBox "Can't find that name. Might be different spelling!"
End Sub[code]
 
Upvote 0
Try so on a copy of your original fist.
Change references if required.
Code:
Sub Maybe()
Dim sh1 As Worksheet, sh2 As Worksheet
Set sh1 = Worksheets("SlotStream")
Set sh2 = Worksheets("Slots")
On Error GoTo SomethingIsWrong
    sh2.Columns(1).Find(sh1.Cells(2, 17), , , 1).Offset(, 1).Value = sh1.Cells(2, 17).Offset(, -7).Value
Exit Sub
SomethingIsWrong: MsgBox "Can't find that name. Might be different spelling!"
End Sub[code]

Thank you, It's Working!
 
Upvote 0
Thank you for letting us know and good luck.
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,933
Members
449,480
Latest member
yesitisasport

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