Help writing a excel macro to do a copy of 4 cells and paste transpose. I need to loop the copy and paste through 6900 rows of data.

  I need help writing a excelmacro to do a copy of 4 cells and paste transpose.  I need to loop the copy and paste through 6900 rows of data.  I started the macro with two rounds of copying & paster transposed but I need help getting it
to loop through all rows.  Here is what macro looks like now.
    Range("I2:I5").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("J2").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=True
    Range("I6:I9").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("J6").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=True
End Sub

Thanks Jim for the solution above.
Hi Brogents,
Thanks for posting in our forum. Please note that this forum focuses on questions and feedback for Microsoft Office client. For any
VBA/Macro related issues, I would suggest you to post in the forum of
Excel for Developers, where you can get more experienced responses:
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
Regards,
Ethan Hua
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.

Similar Messages

  • HT5037 It doesn't work for me. Anyone got any suggestions? Just gets into a loop where I upgrade and then launch and it says I need to download the upgrader and upgrade again. Help!!

    I want to open some old iphoto libraries. The new iphoto says I have to upgrade the library, so I downloaded the upgrader and ran it on the library I wanted to upgrade and still it would not open, just kept giving me the same error message about needing to upgrade the library!! How can I open that old library file?

    Did you go to Applications/Utilities and find the upgrader app and then double click it?

  • Whenever I try to open the installed Photoshop and After Effects, It keeps giving me the terms and conditions, I click yes and it comes back, please help!

    Somebody please help me I just fixed an issue and now I have another one!

    In that case perform the same step once again.
    1.Then Delete Adobe Application Manger and OOBE folders from C:\Program Files (x86)\Common Files\Adobe.
    You may need to Quit Creative Cloud desktop to Delete OOBE..
    Then reinstall Adobe Application manager from below link
    Adobe - Adobe Application Manager : For Windows : Adobe Application Manager
    2.Also try to give full permission for SLCache folder.
    Right click on SLCache and open properties. Then uncheck Read only and Click on Apply
    Click on security tab and click on edit.
    Then click on user and give full permssion.
    Then launch the products and check.
    If it is not working,
    3.Press Windows + R keys. Then In the Run window type inetcpl.cpl. It will open Internet Options.
    Click on Connections > LAN settings.
    Make sure under proxy servers  there are no boxes checked.
    If it is checked uncheck it and check Automatically detected settings, Click on Ok.
    Then try.

  • I have an iphone 4 and trying to upgrade ios 6, downloaded the version and when trying to install get an error that i need internet, i have internet of course... please help...

    I have an iphone 4 and trying to upgrade ios 6, downloaded the version and when trying to install get an error that i need internet, i have internet of course... please help...

    C Mawle wrote:
    Thanks.  I have followed all the instructions as recommended and nothing has worked so it looks like the restore/update may have been interrupted - would loss of internet connection do this?
    Yes it would, possibly even brick it.
    Have successfully connected my ipod nano with iTunes so looks like the device driver is working.
    Can I use my ipod nano USB connector to check?
    It is not much help to you, since the device that you need still not recognized.
    Anyway looks like I may have to swallow the loss of data.  Have set-up a call for tomorrow with Apple support so will wait until after this before doing the factory restore!
    Good luck, but if you expect miracle from that call good luck again.

  • Hello I am trying to download the latest itunes and it keeps asking me to restart the mac and I do but nothing happens. Can someone help? Thankyou

    Hello I am trying to download the latest itunes and it keeps asking me to restart the mac and I do but nothing happens. Can someone help? Thankyou

    Hi Chris, I know where to check for updates but after I agree to terms conditions etc it asks to restart the computer before it can start downloading. I do that and it keeps repeating the process?

  • I am using garage band for the first time.  I dragged and dropped a song from itunes into the program and I want to extend the length of the song by repeating the first 28 measures.  I can't figure it out.  Please help

    I am using garage band for the first time.  I dragged and dropped a song from itunes into the program and I want to extend the length of the song by repeating the first 28 measures.  I can't figure it out.  Please help.  I have spent several hours trying to figure it out on my own but have not been successful.  It seems like an easy task.  Can anyone help?

    dewin1or wrote:
    I want to extend the length of the song by repeating the first 28 measures.
    split the region at the 28th measure
    http://www.bulletsandbones.com/GB/GBFAQ.html#split
    (Let the page FULLY load. The link to your answer is at the top of your screen)
    then select only the first region and option-drag it to the end of the song

  • HT1904 I cannot access iTunes on my iPad. When I click the iTunes button, it shows terms and conditions and when I click the terms and conditions link, it takes me to the Internet and that is it. Kindly help.

    I cannot access iTunes on my iPad. When I click the iTunes button, it shows terms and conditions and when I click the terms and conditions link, it takes me to the Internet and that is it. Kindly help.

    If you are just seeing the Terms and Conditions link in the Downloads tab then that just means that there aren't any downloads waiting. If you want to browser the store then can are you not able to tap on the other tabs at the bottom of the app ?
    If you are looking for your downloaded and synced content then they won't be in the iTunes app (that is just the store)  - your music, audiobooks and audio podcasts will be in the Music app and your films and tv shows in the Videos app.

  • I cannot send emails, only receive, after upgrade to Yosemite today, Apple should resolve this issue. Any help more than welcome. Thanks in response to Pita Fito I have contacted three more people that made the upgrade and they have the same problem

    I cannot send emails, only receive, after upgrade to Yosemite today, Apple should resolve this issue. Any help more than welcome. Thanks
    in response to Pita Fito
    I have contacted three more people that made the upgrade and they have the same problem. My advise is not to upgrade until Apple solves the serious issue, I would hate to have to re-install Outlook...

    I can send e-mails just fine with apple mail on yosemite...
    Might not be a generic problem but rather a personal problem..
    You should try find a fix rather than waiting on apple.
    Hopefully somebody can help you out.
    More than happy to help with your settings/preference pain... And compare mine with yours...
    If you send some screenshots... I can send you my equivalent... So maybe you can figure it out.
    Is it a gmail or icloud email acount? Can be of more help if it is.

  • I have Mac OS10.4.11 with MS Office 2004 installed. Yesterday, when clicking on the Entourage icon, in the dock, to receive my Email, the icon disappeared and I lost my Email service from the HD and from Spotlight, as well. Word, Excel and PP are still OK

    I have Mac OS10.4.11 with MS Office 2004 for Mac, installed. Yesterday, when clicking on the Entourage icon, in the dock, to receive my Email, the icon disappeared and I lost my Email service from the HD and from Spotlight, as well. Word, Excel and PP are still OK. Could this be a virus?

    Just thinking, if things are really missing...
    "Try Disk Utility
    1. Insert the Mac OS X Tiger Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)

  • Help with "You may need to enter the name and password for an administrator

    I'm trying to move files from one of my external harddrives to another external harddrive. I keep getting this message "You may need to enter the name and password for an administrator on this computer to change the item named "Documents". I also get this for other folders I want to move, but not all folders on that drive.
    I am the administrator, and it only gives me an "ok" button, no option to enter my name and password again.
    Any ideas?

    I have the same problem, trying to copy items from external hard disk to another computer on the network. I can copy without problems from external hard disk to my laptop. But not from external hard disk to another computer on the network, and neither from my laptop to another computer on the network, but ONLY if the files I try to copy from my laptop were first copied from that external hard drive. It keeps popping me up with this message. Please help, or fix.

  • Iphone wont turn on. i plug it into charger and it stays at 87% and then i take it out of the charger and it shuts off. and then i try to turn it on and wont turn back on until i plug it back into the charger. HELP ME PLEASE!!

    iphone wont turn on. i plug it into charger and it stays at 87% and then i take it out of the charger and it shuts off. and then i try to turn it on and wont turn back on until i plug it back into the charger. HELP ME PLEASE!! how do i fix this?!

    Hello StephanieeLovezYou,
    Thank you for the details of the issue you are experiencing with your iPhone.  I would be concerned too if my iPhone was only turning on when connected to power.  I found an article with steps you can take when you encounter an issue like this.  I recommend following the steps below:
    Will not turn on, will not turn on unless connected to power, or unexpected power off
    Verify that the Sleep/Wake button functions. If it does not function, inspect it for signs of damage. If the button is damaged or is not functioning when pressed, seek service.
    Check if a Liquid Contact Indicator (LCI) is activated or there are signs of corrosion. Learn about LCIsand corrosion.
    Connect the iPhone to the iPhone's USB power adapter and let it charge for at least ten minutes.
    After at least 30 minutes, if:
    The home screen appears: The iPhone should be working. Update to the latest version of iOS if necessary. Continue charging it until it is completely charged and you see this battery icon in the upper-right corner of the screen . Then unplug the phone from power. If it immediately turns off, seek service.
    The low-battery image appears, even after the phone has charged for at least 20 minutes: See "iPhone displays the low-battery image and is unresponsive" symptom in this article.
    Something other than the Home screen or Low Battery image appears, continue with this article for further troubleshooting steps.
    If the iPhone did not turn on, reset it while connected to the iPhone USB power adapter.
    If the display turns on, go to step 4.
    If the display remains black, go to next step.
    Connect the iPhone to a computer and open iTunes. If iTunes recognizes the iPhone and indicates that it is in recovery mode, attempt to restore the iPhone. If the iPhone doesn't appear in iTunes or if you have difficulties in restoring the iPhone, see this article for further assistance.
    If restoring the iPhone resolved the issue, go to step 4. If restoring the iPhone did not solve the issue, seek service.
    My issue is still not resolved. What do I do next?
    Contact Apple Support.
    You can find the full article here:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • I need to control the position and size of each java swing component, help!

    I setup a GUI which include 2 panels, each includes some components, I want to setup the size and position of these components, I use setBonus or setSize, but doesn't work at all. please help me to fix it. thanks
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.FlowLayout;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.event.*;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JTextField;
    import javax.swing.JPanel;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.DefaultListModel;
    public class weather extends JFrame {
    private String[] entries={"1","22","333","4444"} ;
    private JTextField country;
    private JList jl;
    private JTextField latitude;
    private JTextField currentTime;
    private JTextField wind;
    private JTextField visibilityField;
    private JTextField skycondition;
    private JTextField dewpoint;
    private JTextField relativehumidity;
    private JTextField presure;
    private JButton search;
    private DefaultListModel listModel;
    private JPanel p1,p2;
    public weather() {
         setUpUIComponent();
    setTitle("Weather Report ");
    setSize(600, 400);
    setResizable(false);
    setVisible(true);
    private void setUpUIComponent(){
         p1 = new JPanel();
    p2 = new JPanel();
         country=new JTextField(10);
         latitude=new JTextField(12);
    currentTime=new JTextField(12);
    wind=new JTextField(12);
    visibilityField=new JTextField(12);
    skycondition=new JTextField(12);
    dewpoint=new JTextField(12);
    relativehumidity=new JTextField(12);
    presure=new JTextField(12);
    search=new JButton("SEARCH");
    listModel = new DefaultListModel();
    jl = new JList(listModel);
    // jl=new JList(entries);
    JScrollPane jsp=new JScrollPane(jl);
    jl.setVisibleRowCount(8);
    jsp.setBounds(120,120,80,80);
    p1.add(country);
    p1.add(search);
    p1.add(jsp);
    p2.add(new JLabel("latitude"));
    p2.add(latitude);
    p2.add(new JLabel("time"));
    p2.add(currentTime);
    p2.add(new JLabel("wind"));
    p2.add(wind);
    p2.add(new JLabel("visibility"));
    p2.add(visibilityField);
    p2.add(new JLabel("skycondition"));
    p2.add(skycondition);
    p2.add(new JLabel("dewpoint"));
    p2.add(dewpoint);
    p2.add(new JLabel("relativehumidity"));
    p2.add(relativehumidity);
    p2.add(new JLabel("presure"));
    p2.add(presure);
    this.getContentPane().setLayout(new FlowLayout());
    this.setLayout(new GridLayout(1,2));
    p2.setLayout(new GridLayout(8, 2));
    this.add(p1);
    this.add(p2);
    public static void main(String[] args) {
    JFrame frame = new weather();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
    [http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html]
    db

  • I have Dreamweaver CS5 with Windows 8 and it won't stay connected to the server and it says I need flash plug in, please help

    I have a Gateway computer with Windows 8 installed.  I have installed Dreamweaver CS5 to manage my website and it won't stay connected to the server.  It also won't play flash and says I need a flash plug in.  Please help

    #1  Try toggling Passive FTP on/off in your remote server's site definition.
    #2 Except for a handful of gaming sites, Flash is a dead web technology.  It's not supported by iPhone, iPad, iTouch, Android, etc...  I don't recommend using Flash for anything these days.  Better to use HTML5, CSS level 3 and JavaScript.
    Nancy O.

  • I have a iPad 2 .i downloaded  iOS 7.1.1 when done loading I pug and around circle blue with iTunes in the circle and that's how it stays any  help out there thank you

    I have a iPad two . Update was ios7.1.1 so I updated to it .when done up dating on the screen appeared a pug and a blue circle that said iTunes . and that's how it is staying .. I try to shutdown did not work anybody out there can help me ????????? ;-(((

    Hello Mamoe1,
    This screen indicates that the iPad is in recovery mode, and must be restore, as detailed in the article linked below.
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808
    Cheers,
    Allen

  • Help writing a excel function to a cell using powershell

    I have been working on a function that will write worklog information to an excel template. I am able to get it to work but once i added the date column and tried to write a excel function to it I'm getting the below error.
    Exception setting "Item": "Exception from HRESULT: 0x800A03EC"At
    C:\Users\shuppz\Documents\WindowsPowerShell\Modules\Client Config CDRL\Source\Get-Assignment.ps1:1482 char:4
    + $Main.Cells.Item($i, 9) = $DateFunction
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : CatchFromBaseAdapterParameterizedPropertySetValueTI
    the excel string i need to add to the cell is to add a date and the string i created is in the below function called $DateFunction.
    Function Create-Worklog
    Param ($NewFile, $DBName, $Work)
    $before = @(Get-Process [e]xcel | %{ $_.Id })
    $ExcelObject = new-Object -comobject Excel.Application
    $ExcelId = Get-Process excel | %{ $_.Id } | ? { $before -notcontains $_ }
    $ExcelObject.visible = $False
    $ExcelObject.DisplayAlerts = $False
    $ActiveWorkbook = $ExcelObject.WorkBooks.Open($NewFile)
    $Main = $ActiveWorkbook.Worksheets.Item('Worklog')
    $Main.Cells.Item(2, 6) = $(Get-Date -f MM/dd/yyyy)
    $Main.Cells.Item(3, 6) = $($DBName.Replace(".accdb",""))
    $i = 6
    ForEach ($W in $Work)
    $DateFunction = "=IF (G$i = " + [char](34) +"Mitigated" + [char](34) + ", TODAY(), IF (G$i = " + [char](34) +"Escalated" + [char](34) + ", TODAY(), IF (G$i = " + [char](34) +"Offline"", TODAY(), " + [char](34) +")))"
    $Main.Cells.Item($i, 1) = $W.Workstation
    $Main.Cells.Item($i, 2) = $W.VulnCount
    $Main.Cells.Item($i, 3) = $W.OS
    $Main.Cells.Item($i, 4) = $W.AuditID
    $Main.Cells.Item($i, 5) = $W.Name
    $Main.Cells.Item($i, 6) = $W.Fix
    $Main.Cells.Item($i, 7) = "Open"
    $Main.Cells.Item($i, 9) = $DateFunction
    $TBString = "{0},{1}" -f $W.Workstation, $W.AuditID
    $Main.Cells.Item($i, 12) = $TBString
    $i++
    $ActiveWorkbook.SaveAs($NewFile)
    $ExcelObject.Quit() | Out-Null
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($ExcelObject)
    Stop-Process -Id $ExcelId -Force -ErrorAction SilentlyContinue
    If someone can help me figure out how to add this custom excel function. When I run the function everything gets filled out but the date function.

    Try this instead:
    $DateFunction = "=IF (G$i = `"Mitigated`", TODAY(), IF (G$i = `"Escalated`", TODAY(), IF (G$i = `"Offline`", TODAY(), `"`")))"
    You can just escape the " with a backtick ` you don't need + [char](34) +
    You were also missing a double-quote at the end of the formula which is probably what was causing the problem.
    I hope this post has helped!

Maybe you are looking for

  • Reading Xml file using File Adapter

    Hi I have added a file adapter to my process to read out a emp.xml from the location C:\inputDir. Also i have added transformation activity to map the variables. But the problem is iam not able read the values from emp.xml;File adpater giving me as e

  • Windows 8.1 Moving Desktop Icons Problem

    I just installed Windows 8.1 and I'm very happy with it. There is just one problem I have and I hope you can help me resolve it. I can't move my desktop icons. Windows is newly installed and I don't have any third-party software that could mess up ev

  • Problems with buttons on embedded swf files or workaround how to loop mp3s? ...

    Hello there, I'm new to the topic of flash and rich media in pdf files so please forgvie me if I ask a Newbie question. Here's the situation. I have an image slide show of ~18s and an audio file of ~3mins that I want to play as loops embedded in a pd

  • ITunes 7 dosen't work

    when i skall open iTunes it comes up "iTunes can't start because it has found a problem with the soundoptions" but before i downloaded the new verson, i had the same options, do anyone know what opstions i need the changse??

  • Java article's links are broken in Oracle website

    Hi All, Why I am not able browse any articles on J2EE design patterns, etc which were based on sun.java.com url? For eg: If I try to access, http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html It shamelessly redirects me to this URL: