Concatenate or TextJoin Same Cell Multiple Times based on Value in another Cell

0 votes
Currently, I'm having trouble with Excel with a situation involving some amino acid data.

The concept is that I would need to polymerize (functionally connect to themselves) a series of AA residues a certain number of times depending on a multiplier.

Hence, if I want to polymerize the sequence AAGKLY four times, the result should be AAGKLYAAGKLYAAGKLYAAGKLY.

AAGKLY and the number 4 should ideally be in separate cells, and my formula should output the entire concatenation in the last cell.

Concatenate() appears to be my best option, but I am unable to implement any kind of While Loop using VBA. The other alternative that seems feasible to me is a huge if statement, but that raises the possibility of someone utilising this sheet to perform, say, a polymerization 50 times when I've only written up to 40 if statements. Is it possible to effectively use the concatenate function?
Feb 18, 2023 in Others by Kithuzzz
• 38,000 points
636 views

1 answer to this question.

0 votes

Use the REPT function:

=REPT("ABC",4) => ABCABCABCABC
answered Feb 18, 2023 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
1 answer

Trying to run different macros based on value of cell in a range

This demonstrates one approach to loop through ...READ MORE

answered Jan 19, 2023 in Others by narikkadan
• 63,600 points
448 views
0 votes
1 answer

VBA Change Cell colors based on value, and it can deal with single cell and multiple cells changes

Before looping through all of the cells ...READ MORE

answered Jan 21, 2023 in Others by narikkadan
• 63,600 points
683 views
0 votes
1 answer

Attributing the value of a cell based on another corresponding cell

Put in cell B1 of Sheet1: =INDEX(Sheet2!B:B;MATCH(A1;Sheet2!A:A;0)) Drag it ...READ MORE

answered Jan 23, 2023 in Others by narikkadan
• 63,600 points
436 views
0 votes
1 answer

Excel VBA: Trying to read all files in folder based on cell input and output to another cell

Your array has no capacity for data ...READ MORE

answered Jan 24, 2023 in Others by narikkadan
• 63,600 points
601 views
0 votes
1 answer

Reversing Text to Columns in Excel/Calc

There are built-in functions that will allow ...READ MORE

answered Nov 15, 2022 in Others by narikkadan
• 63,600 points
521 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17, 2022 in Others by Edureka
• 13,690 points
975 views
0 votes
1 answer

Remove formulas from all worksheets in Excel using VBA

Try this : Option Explicit Sub test1() ...READ MORE

answered Oct 3, 2022 in Others by narikkadan
• 63,600 points
2,019 views
0 votes
1 answer

Calculate monthly average from daily data without PivotTable

Assuming you have the months in column D enter ...READ MORE

answered Oct 3, 2022 in Others by narikkadan
• 63,600 points
1,764 views
0 votes
1 answer

Formula for inserting a thumbnail picture into excel cell, based on another cell's value

Here is a really excellent tutorial on ...READ MORE

answered Oct 31, 2022 in Others by narikkadan
• 63,600 points
1,522 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP