Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to convert abbreviations to its expansions?


Hi Guys,

Currently i have Abbreviations and its expansions in the Sheet2 at
column A and B respectively and in the sheet1 i have abbreviations
filled in the D column and i have applied Vlookup formula with the in
the colmun F of sheet 1 to display the expansions.however the data of
abbreviations is huge and it will change everyday as per the flow we
receive so it is very difficult for the user to drag the vlookup formula
till last data.

So can any tell how this can be sorted though Macro instead of a
Vlookup formula.

Any help would be appreciated.

Regards,

Raja


--
Raja
------------------------------------------------------------------------
Raja's Profile: http://www.thecodecage.com/forumz/member.php?userid=497
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=115688

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to convert abbreviations to its expansions?


Raja, can you supply a sample workbook so we can see your structure and
better understand what you mean?
Raja;415510 Wrote:
Hi Guys,

Currently i have Abbreviations and its expansions in the Sheet2 at
column A and B respectively and in the sheet1 i have abbreviations
filled in the D column and i have applied Vlookup formula with the in
the colmun F of sheet 1 to display the expansions.however the data of
abbreviations is huge and it will change everyday as per the flow we
receive so it is very difficult for the user to drag the vlookup formula
till last data.

So can any tell how this can be sorted though Macro instead of a
Vlookup formula.

Any help would be appreciated.

Regards,

Raja



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=115688

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Macro to convert abbreviations to its expansions?

there's no need to "drag" the formula. simply select the last cell with the
formula, hover the mouse over the black dot on the lower right hand corner
so the cursor becomes a black cross, then double-click to fill down

to replicate the formula in F down to the bottom of D in VBA

Option Explicit
Sub copyFormula()
Dim D_last_row As Long
With Worksheets("Sheet1")
D_last_row = .Range("D" &
..Range("D:D").Rows.Count).End(xlUp).Row
With .Range(.Range("F" & .Range("F:F").Rows.Count).End(xlUp),
..Range("F" & D_last_row))
.FormulaR1C1 = .Range("A1").FormulaR1C1
End With
End With
End Sub

method: find the last row of D set the F range to the last cell used in F
to the cell in F at the last row of D and then copy the formula from the
first cell.

so if last F is F60 and last D is D2200, then F60:F2200 will be used.
the formula in F60 is then set as the formula for all the cells in F60:F2200







"Raja" wrote in message
...

Hi Guys,

Currently i have Abbreviations and its expansions in the Sheet2 at
column A and B respectively and in the sheet1 i have abbreviations
filled in the D column and i have applied Vlookup formula with the in
the colmun F of sheet 1 to display the expansions.however the data of
abbreviations is huge and it will change everyday as per the flow we
receive so it is very difficult for the user to drag the vlookup formula
till last data.

So can any tell how this can be sorted though Macro instead of a
Vlookup formula.

Any help would be appreciated.

Regards,

Raja


--
Raja
------------------------------------------------------------------------
Raja's Profile: http://www.thecodecage.com/forumz/member.php?userid=497
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=115688

Reply
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
State names into abbreviations jennie Excel Worksheet Functions 2 July 28th 09 09:25 PM
How do I get key codes for chemical Abbreviations pj Excel Discussion (Misc queries) 2 February 14th 09 11:07 AM
Validation for state abbreviations k1ngr Excel Discussion (Misc queries) 2 February 29th 08 10:09 PM
Convert State abbreviations color coded cell exceluser Excel Worksheet Functions 9 December 27th 07 10:03 PM
state abbreviations gls858 New Users to Excel 7 June 20th 07 09:34 PM


All times are GMT +1. The time now is 01:10 PM.

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

About Us

"It's about Microsoft Excel"