InputBox and Cut and Paste based on value

Status
Not open for further replies.

bloomingflower

New Member
Joined
Mar 9, 2020
Messages
19
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I have a problem: I need to line the same people in column B and currently it looks like this person is always in one cell from A-H but not always in column B as desired. If this person is in for example column H then I have to move him/her to column B and person from column G to column A (the rest can be deleted). If this person is in column A then I need to move that person to column B. There is more data for the row (after I column) and I need to get the name via InputBox.

Thank you in advance!

Example:
JackBobMarkFrankJohn
BobMarkFrankAlex
MarkFrankJohn
FrankJohn
BobMarkFrankDavid
FrankTom
JackBobMarkFrankAlex

Desired Outcome:
MarkFrankJohn
MarkFrankAlex
MarkFrankJohn
FrankJohn
MarkFrankDavid
FrankTom
MarkFrankAlex
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I was thinking about such solution. First it should have InputBox, and then it should go to the loop. If this text is in A then it should move this value to column B. If it is in B then it should do nothing. If it is in C it should move B to A, C to B, D to C and E to D. If it is in D it should move C to A, D to B and E to C. If it is in E it should move D to A, E to B and remove C. Is there anyone who could code it for me?
 
Upvote 0
Duplicate Cut and paste in Excel

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,551
Messages
6,120,156
Members
448,948
Latest member
spamiki

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