How to delete the columns except the first three columns? [closed] - excel

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a worksheet where after all the operations are done I want to clear all the contents except in first three columns (A, B, C).
Is it possible to achieve using VBA?

To remove formula and values use:
Range("D:XFD").ClearContents
To remove formula, values and formatting, use:
Range("D:XFD").Clear

Related

Count the number of columns with ID x in excel [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I'm trying to count the columns that have the same name. I need a formula to apply it to all data.
For example, I am trying to count the amount of cloumns with ID=11 and write them in row "N".
Is there a simple formula for this?
Try using COUNTIF:
=COUNTIF(A3:A25, 11)

Change number in string in VBA [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a column in an excel-sheet like this:
a_bcdfg02fga
k_lmnop05fab
x_yzabd03ea
I would like to substract the number by 1 in these string to get a column like this
a_bcdfg01fga
k_lmnop04fab
x_yzabd02ea
I never face such a problem so I don't even know where to start.
Use a simple formula:
=LEFT(A1,7)&text(MID(A1,8,2)-1,"00")&MID(a1,10,20)

If column contains Y concatenate headings [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Got a list of data with 7 columns each with a Y in, I want to add a formula that will check for a Y in the column then concatenate the headings if correct and ignore if not.
See below example
Is this possible?
Try this User Defined Function.
=TextJoinIfs(", ", 0, 0, B$1:H$1, B2:H2, "y")
I did not get the TextJoinIfs to work, sadly, looks neat. If you have the same problem maybe this can be a solution. Not pretty I know...
=TEXTJOIN(",",TRUE,IF(IFERROR(MATCH("Y",A2),FALSE),"col 1",""),IF(IFERROR(MATCH("Y",B2),FALSE),"col 2",""),IF(IFERROR(MATCH("Y",C2),FALSE),"col 3",""),IF(IFERROR(MATCH("Y",D2),FALSE),"col 4",""),IF(IFERROR(MATCH("Y",E2),FALSE),"col 5",""),IF(IFERROR(MATCH("Y",F2),FALSE),"col 6",""),IF(IFERROR(MATCH("Y",G2),FALSE),"col 7",""),)

conditional formatting in excel 2010 for one letter [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have four answers in a table. "A", "NA", "SA" and "NM". I need all four questions to be highlighted with a different color. How do I make excel ignore the "a" in "sa" and make those two cells different colors?
You just set up the rules:
Results:

Replaces text.number to number [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a excel cells with username.id.I want to delete usernames and I just want ID's to be displayed in cells.
EG: sunny.123 should be transformed to 123
Try this formula:
=RIGHT(A1,LEN(A1)-SEARCH(".",A1))*1
This assumes that your IDs are always using the schema String.Number
If this is not always the case, this formula handles a few more situation:
=IF(ISERROR(SEARCH(".",A1)),IF(ISNUMBER(A1),A1,"Pattern does not match User.Id!"),RIGHT(A1,LEN(A1)-SEARCH(".",A1))*1)

Resources