Switch data macro

NurseRich

New Member
Joined
May 16, 2024
Messages
1
Office Version
  1. 2011
  2. 2010
Platform
  1. Windows
I have a work book with 4 sheets (Census, 100 Unit, 200 Unit, and 300 Unit).
The Census sheet contains room numbers and resident names.
The resident names populate on to the appropriate unit according to the room number.
The units sheets are all the same format.
I am trying to make a macro which prompts the user to select a room number on the census sheet in column A using their mouse. Then select a second resident in the same way.
The macro then switches the names on census, but also seeks the room numbers on the other sheets and switches all the data in columns B,C,D,E,F,G,H and I (except for the room number in column B).

Often times, our residents need to have their rooms switched. I am trying to create an easy method to do this. I have tried the AI stuff, and it's not working.
Any assistance would be helpful.

Thank you so much,

Nurse Rich

Attached are screen shots to better understand what things look like.
Using Windows 10 Pro
Microsoft Excel version 2404 Microsoft 365
 

Attachments

  • census.JPG
    census.JPG
    41.8 KB · Views: 15
  • Unit 100 200 300.JPG
    Unit 100 200 300.JPG
    95.1 KB · Views: 15

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hello NurseRich, will you please provide more details. Please go step by step. For example, in your image, the 1st step is to click cell A7 in Census. Is step2 click B7, then step3 click A38, 4th step click B38? Wait a minute, I think I got it, you're wanting to move patient100 from room 104-A to another room. what room is patient100 104-A going? The part about the second resident is not clear. How does the second resident relate to patient100? Patient100 can move to any other room, and the second patient can move to any other room. correct? Cheers!
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,213
Members
452,618
Latest member
Tam84

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