Results 1 to 3 of 3

Please help! loop/Insert text in first blank space

Threaded View

  1. #1
    Registered User
    Join Date
    10-12-2015
    Location
    Kent
    MS-Off Ver
    2010
    Posts
    2

    Please help! loop/Insert text in first blank space

    Hi all,

    I hope someone can help it is driving me insane!!

    I am using Ron de Bruin Popup menus to form an invoice by selecting the following Sub test macros, however I am trying to loop to the next blank cell, IE if cells b21:j21 are already filled that it loops to b22:j21and inserts the text in there.

     Sub TestMacro1()
     Range("b21").Select
     ActiveCell.FormulaR1C1 = "Peugeot 206"
     Range("c21").Select
     ActiveCell.FormulaR1C1 = "1 Previous owner"
     Range("h21").Select
     ActiveCell.FormulaR1C1 = "£3,195.00"
     Range("j21").Select
     ActiveCell.FormulaR1C1 = "Blue"
     End Sub
    
     Sub TestMacro2()
     Range("b21").Select
     ActiveCell.FormulaR1C1 = "Ford KA"
     Range("c21").Select
     ActiveCell.FormulaR1C1 = "2 Previous owners"
     Range("h21").Select
     ActiveCell.FormulaR1C1 = "£4,195.00"
     Range("j21").Select
     ActiveCell.FormulaR1C1 = "Black"
     End Sub
    I have tried lots of loop formula from different sites however none really work

    Many thanks for your help
    Paul
    Last edited by pkilsby1; 10-12-2015 at 10:33 AM. Reason: Broke the Rules (no TAGS)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to find a value and insert blank space after it
    By deweyirl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2015, 04:25 PM
  2. [SOLVED] Loop Through Column B and insert a space in each cell, without deleting the contents.
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2014, 10:10 AM
  3. [SOLVED] Copy Text Until Blank Space
    By deadmanramsey in forum Excel General
    Replies: 4
    Last Post: 03-25-2014, 09:07 AM
  4. [SOLVED] Long String of text and need to insert space every 8th character
    By jbang917 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-12-2013, 03:45 PM
  5. How can I insert a space btw lines of text?
    By jspence in forum Excel General
    Replies: 1
    Last Post: 06-17-2011, 01:56 PM
  6. Cell wrap text: Some cells have blank white space above text
    By stuckagain in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 06-09-2009, 06:47 AM
  7. Blank space gets inserted after text
    By Ros M in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 09-26-2005, 10:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1