Selecting a cell based on the contents of another

ianto2842

New Member
Joined
Apr 7, 2021
Messages
19
Office Version
  1. 2013
Platform
  1. Windows
So I have a big table and a column of data values to input into it on two separate tabs, but the data can go into different rows or columns based on various conditions. I have therefore got a helper column, producing the cell reference that the values need to be copied into. So for example below

So in this example I need the VBA to work out that 56 needs to be copied as a value into cell H5, 8 needs to go into cell AB2, etc. The values in columns A and B will change, but whatever is in B1 will need to be copied to whatever cell reference is in A1, and so on.

Capture.JPG


I'm imagining a lot of defining variables (which will take a while but is fine) but I'm not sure how to make it recognise the value in A1 as a cell reference, not a value. I'm fine with copying and pasting etc afterwards, its just that part I'm struggling with.

Any help would be greatly appreciated! Thanks!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
So I have a big table and a column of data values to input into it on two separate tabs, but the data can go into different rows or columns based on various conditions. I have therefore got a helper column, producing the cell reference that the values need to be copied into. So for example below

So in this example I need the VBA to work out that 56 needs to be copied as a value into cell H5, 8 needs to go into cell AB2, etc. The values in columns A and B will change, but whatever is in B1 will need to be copied to whatever cell reference is in A1, and so on.

View attachment 78949

I'm imagining a lot of defining variables (which will take a while but is fine) but I'm not sure how to make it recognise the value in A1 as a cell reference, not a value. I'm fine with copying and pasting etc afterwards, its just that part I'm struggling with.

Any help would be greatly appreciated! Thanks!

So I have a big table and a column of data values to input into it on two separate tabs, but the data can go into different rows or columns based on various conditions. I have therefore got a helper column, producing the cell reference that the values need to be copied into. So for example below

So in this example I need the VBA to work out that 56 needs to be copied as a value into cell H5, 8 needs to go into cell AB2, etc. The values in columns A and B will change, but whatever is in B1 will need to be copied to whatever cell reference is in A1, and so on.

View attachment 78949

I'm imagining a lot of defining variables (which will take a while but is fine) but I'm not sure how to make it recognise the value in A1 as a cell reference, not a value. I'm fine with copying and pasting etc afterwards, its just that part I'm struggling with.

Any help would be greatly appreciated! Thanks!
Ignore this - solved it!
 
Upvote 0
Good to hear you got the solution.

If you would like to post the solution then it is perfectly fine to mark your post as the solution to help future readers. Otherwise, please do not mark a post that doesn't contain a solution.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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