Solved

EXCEL VBA CODE

Posted on 2014-02-25
3
446 Views
Last Modified: 2014-02-26
Hi

How do I write VBA code for this please:

Domestic<space>Airlines<Alt+Enter>LIST

(note: it could have a space after the word Airlines if necessary)

Many thanks
0
Comment
Question by:GAILBAKER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 39887771
If you are trying to write that to a cell:

Range("a1") = "Domestic Airlines" & Chr(10) & "LIST"
Rows(1).AutoFit

Open in new window

0
 

Author Comment

by:GAILBAKER
ID: 39887993
Many thanks Patrick - it worked:

Sub X()
'
' X Macro
'

'
        Cells.Find(What:="DOMESTIC AIRLINES" & Chr(10) & "LIST", After:=ActiveCell, LookIn:= _
        xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:= _
        xlNext, MatchCase:=False, SearchFormat:=False).Activate
End Sub

Best wishes, Gail
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 39888685
Glad to help :)
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question