0

My goal is a function/macro/script that automatically inserts a text in every selected cell by a key combination (or similar). The inserted text needs to stand at the beginning as seen in the example below.

Cells A1,A2,A3.....,A10

A1: open

A2: open

A3: Closed

A4: open 5. August

A5: Closed

A6: Closed

A7: open 8. April

A8: open

A9: open 14. April

A10: Closed

I would like to select cells A3-A7 and then use a keyboard shortcut (or similar) to supplement the contents of the cells with date and shortname (in this case: 17.11.20 hl). This will then result in:

Cells A1,A2,A3.....,A10

A1: open

A2: open

A3: 17.11.20 hl Closed

A4: 17.11.20 hl open 5. August

A5: 17.11.20 hl Closed

A6: 17.11.20 hl Closed

A7: 17.11.20 hl open 8. April

A8: open

A9: open 14. April

A10: Closed

I appreaciate any help. Thanks a lot.

Best Luca

0

I cannot see a particular pattern that an algorithm could use to find what you want to insert into what, so here's one way you could do it:

Data in cell A3: [Closed]

In an adjacent cell, say, B3, type [="17.11.20 hl "&A3]

Copy and paste (or drag) this from cells A3 to A7

Your 'keyboard shortcuts' will then be Ctrl+C and Ctrl+V ;-)

| improve this answer | |
  • This does not make the process any faster than before. ;-) At this moment, I click in every cell and simple paste "17.11.20 hl" at the beginning of the cell. It would be so cool if there would be a macro that puts my text in front of every cell i marked. I'm not an excel / google sheets professional. I thought that somethink like this would be possible.... :) – Luca Nov 19 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.