LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Aircraft Scheduling Problem VBA code needs adjustment.

I have a fairly simple challenge and while writing a macro and I got
stuck....

My challenge:

I want to detect cells with a certain value in a column, and if the
result is true, I want letter "e" to be added as a suffix to the
existing text in another column. For instance, if values in (Aircraft
Code), Column B = CRJ, or EMB, or EMR, then the letter "e", signifying
express should be added as a suffix to the text in column A in the
correspoding row. The goal is to add E - for Express Flights to Airlines
operating CRJ, or, EMB, or EMR aircraft.

For e.g.
Before macro

Column A Column B
CO CRJ

After macro

Column A Column B
COE CRJ

As you can see, I tack on an "E' following the CO, to depict Express
flights.

My solution (doen't work??):

I took a stab at writing some code and Im stuck with just some
structure, which may not make much sense, but if you could help I'd
appreciate it...

Sub ExpressLink()
For Each amount In Range("B:B") 'Substitute your range here
If amount.Value = CRJ Then
amount.Value = 0 '.........instead, how can i say, value in
another cell in Column A on the same row - or something
End If
Next amount
For Each amount In Range("B:B") 'Substitute your range here
If amount.Value = EMB Then
amount.Value = 0 '.........instead, how can i say, value in
another cell in column A on the same row - or something
End If
Next amount
End Sub

Appreciate any help on this. I have a spreadsheet with about 35K rows,
so your VBA contribution will be a Thanksgivin' present!

Thank you in advance

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro adjustment Tel Excel Discussion (Misc queries) 6 July 6th 09 02:06 PM
Code Adjustment albertmb Excel Discussion (Misc queries) 3 April 7th 09 05:51 PM
Value Axis Adjustment Workbook Excel Worksheet Functions 2 December 14th 08 04:54 PM
Calculating dates - complex scheduling problem jct Excel Worksheet Functions 1 February 22nd 06 08:01 PM
VBA adjustment for beginner mpb1 Excel Programming 2 July 25th 03 04:44 AM


All times are GMT +1. The time now is 07:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"