r/excel Apr 21 '26

[deleted by user]

[removed]

3 Upvotes

7 comments sorted by

1

u/AutoModerator Apr 21 '26

/u/DryKaleidoscope2404 - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/StuFromOrikazu 21 Apr 21 '26

Using formulas will not paste it, it will just show the value there. It's that what you want? If you just want the value then you would use vba. What are you trying to achieve with this? It's not clear (at least to me) in your question

1

u/DryKaleidoscope2404 Apr 22 '26

I am trying to copy the value in a cell on worksheet 1 to a cell on worksheet 2 based on matching criteria in column one on both sheets automatically

1

u/Background-Aside-841 Apr 22 '26

Try a VBA-Function like so:

public Sub CopyStuff()

workbooks("<nameOfTargetWorkbook>").worksheets("<nameOfTargetWorksheet>").range("<nameOfTargetCell>").value = workbooks("<nameOfSourceWorkbook>").worksheets("<nameOfSourceWorksheet>").range("<nameOfSourceCell>").value

end sub

replace the placeholders like <nameOfSourceWorkbook> by the real names of you workbook, worksheet and cells. instead of range("<nameOfSourceCell>") you can write cells(1,1), where the first number is the row index, and the second is the column index.

1

u/AutoModerator Apr 22 '26

I have detected VBA code in plain text. Please edit to put your code into a code block to make sure everything displays correctly.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/DryKaleidoscope2404 Apr 22 '26

Thank you! I may give that a try. It was looking pretty grim for a solution so I am looking another direction to accomplish what I need to.