How to copy a formula horizontally within a table using Excel VBA

0 votes
I'm trying to write a macro to add an extra column to each table, and simultaneously copy over the formula from the previous column. The adding of a new column is going great, but the copying-over is causing me problems.
Feb 15, 2022 in Others by Edureka
• 13,690 points
• 3,432 views

2 answers to this question.

0 votes

Excel has an option to sort the data horizontally using the Sort dialog box (the ‘Sort left to right’ feature).

  1. In the row below, enter ‘Helper’ as the heading for the row
  2. In the helper row, enter a series of numbers (1,2,3, and so on).
  3. Select the entire data set including the helper row
  4. Click the Data tab
  5. Click on the Sort icon
  6. In the Sort dialog box, click on the Options button.
  7. In the dialog box that opens, click on ‘Sort left to right'
  8. Press OK,In the Sort by drop-down, select Row 3 (or whatever row has your helper column)
  9. In the Order drop-down, select ‘Largest to Smallest’. Press OK
  10. The above steps will Flip the table horizontally and u can remove the helper row
answered Feb 16, 2022 by gaurav
• 25,250 points
0 votes
Hi so basically, create an adjacent column and name it 'Header' and add a series number (1,2,3,4 and so on )

Now select the entire data set along with the helper column. You can see a Data tab in the excel sheet. Select that
Select the sort icon. After you select that, select ‘Helper’ in the ‘Sort by’ dropdown
When you select that, in the drop-down select ' Largest to smallest '
and then Select OK
 

After this, your question will be sorted
answered Feb 16, 2022 by Edureka
• 13,690 points

Related Questions In Others