rept function only visible

%3CLINGO-SUB%20id%3D%22lingo-sub-3224966%22%20slang%3D%22en-US%22%3Erept%20function%20only%20visible%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3224966%22%20slang%3D%22en-US%22%3EHello%20I%20have%20a%20question%20how%20can%20I%20use%20the%20REPT%20function%20only%20for%20cells%20that%20are%20filtered%20or%20visible%20in%20Excel%3F%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3224966%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3225066%22%20slang%3D%22en-US%22%3ERe%3A%20rept%20function%20only%20visible%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3225066%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1320644%22%20target%3D%22_blank%22%3E%40Fbrsn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20syntax%20of%20REPT%20is%20%3DREPT(%3CEM%3Etext%3C%2FEM%3E%2C%20%3CEM%3Enumber_of_repetitions%3C%2FEM%3E)%3C%2FP%3E%0A%3CP%3ECan%20you%20explain%20how%20you%20want%20this%20to%20interact%20with%20a%20filter%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3244922%22%20slang%3D%22pt-BR%22%3ERe%3A%20rept%20function%20only%20visible%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3244922%22%20slang%3D%22pt-BR%22%3ELike%20when%20you%20use%20the%20formula%20%22subtotal(102)%22%20that%20when%20it%20is%20applied%20with%20the%20filter%20active%20it%20only%20counts%20the%20numbers%20that%20are%20filtered%20or%20visible%20in%20the%20worksheet%20the%20same%20thing%20I%20think%20of%20doing%20with%20the%20formula%20rept%20example%20I%20have%20the%20cellA1%3CBR%20%2F%3E%3CBR%20%2F%3E%20-%20text1A2%3CBR%20%2F%3E%20-%20text2When%3CBR%20%2F%3E%3CBR%20%2F%3E%20I%20apply%20the%20formula%20rept(A1%3B1)%20the%20result%20will%20be%20text1But%3CBR%20%2F%3E%3CBR%20%2F%3E%20I%20want%20to%20apply%20the%20filter%20and%20cell%20A2%20and%20I%20want%20to%20have%20the%20result%20Text2%20because%20the%20filter%20is%20applied%20with%20cell%20A2%20thanks%3C%2FLINGO-BODY%3E
New Contributor
Hello I have a question how can I use the REPT function only for cells that are filtered or visible in Excel?
4 Replies

@Fbrsn 

The syntax of REPT is =REPT(text, number_of_repetitions)

Can you explain how you want this to interact with a filter?

Like when you use the formula "subtotal(102)" that when it is applied with the filter active it only counts the numbers that are filtered or visible in the worksheet the same thing I think of doing with the formula rept example I have the cell

A1 - text1
A2 - text2

When I apply the formula rept(A1;1) the result will be text1

But I want to apply the filter and choosing cell A2 and I want to have the result Text2 because the filter is applied with cell A2 thanks

@Fbrsn 

I'm sorry, I have no idea what you want.

OK thanks