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 in Others by Edureka
• 13,640 points
209 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 by gaurav
• 22,040 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 by Edureka
• 13,640 points

Related Questions In Others

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to print an Excel Sheet using VBA with Nitro PDF Creator in Excel 2016

you can use the built-in excel facilities ...READ MORE

answered Sep 24 in Others by narikkadan
• 37,660 points
129 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,720 points
452 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
2,225 views
0 votes
1 answer

Language independent way to get "My Documents" folder in VBA Excel 2003

 Hello :)  This code may help you in your ...READ MORE

answered Feb 16 in Others by Edureka
• 13,640 points
91 views
0 votes
0 answers

Excel: Highlighting duplicates with exact matches

1 I've got two columns of data, and ...READ MORE

Feb 17 in Others by Edureka
• 13,640 points
63 views
0 votes
1 answer

Using VBA Excel to create a gramatically correct list

The Excel AND function is a logical ...READ MORE

answered Feb 9 in Others by gaurav
• 22,040 points
70 views
0 votes
1 answer

How to import data from a HTML table on a website to excel?

Hello  To import any HTML file in excel there ...READ MORE

answered Feb 10 in Others by gaurav
• 22,040 points
314 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