VBA If Range equals Active Cell then paste "Specific Text" to corresponding column

Falko26

Board Regular
Joined
Oct 13, 2021
Messages
89
Office Version
  1. 365
Platform
  1. Windows
Hey Team,

I'm trying to write a VBA code to fill in the status column of a table with either "Open" or "Closed" based on if the job number column of the table equals the active cell selected. I'm working between two sheets.

What I'm trying to do is select a specific job number from the Project Information list on sheet "Received %".
Then run the "Open Project" Macro which will look to the sheet "Open" and if column "Job Number" = Active cell then paste the word "Open" into corresponding cells in the column "Status"

Then ill duplicate this code to make a "Close Project" Macro to do the opposite action.

Otherwise if using the active cell value doesn't work I thought we could do a "Open Project" Macro that brings up a list of unique Job Numbers from the "Open" sheet that you can pick from to do the same action. but that's a little advanced for my knowledge not even sure if that's an option.

But I would like to add a Message box at the end that asks the user if they are sure they want to "Close" or "Open" said Job Number before running Macro.

Sheet "Received %"
1642013791287.png


Sheet "Open"
1642013905058.png


Thanks!
 
I've learnt most of what I know from here, so don't really know what the various online resources are like.
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,216,028
Messages
6,128,392
Members
449,445
Latest member
JJFabEngineering

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