#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 542
Default Macros

I have many different cells in one workbook. They are split into monthly
totals. In a seperate workbook i am using a vlookup formulae to reurn the
information. How can i record a mcro to change the following formulae from
=VLOOKUP(B86,'[PLAYERS SHEET.xlsx]Sheet1'!$1:$1048576,37,0), where i'm
looking fo column 37 to the same but looking for column 50,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Macros

say the formula is in cell Z100

Sub james()
Dim s As String
Dim Z As Range
Set Z = Range("Z100")
s = Z.Formula
s2 = Replace(s, "37", "50")
Z.Formula = s2
End Sub

Use a simple loop if you have other cells to change.
--
Gary''s Student - gsnu200816


"James" wrote:

I have many different cells in one workbook. They are split into monthly
totals. In a seperate workbook i am using a vlookup formulae to reurn the
information. How can i record a mcro to change the following formulae from
=VLOOKUP(B86,'[PLAYERS SHEET.xlsx]Sheet1'!$1:$1048576,37,0), where i'm
looking fo column 37 to the same but looking for column 50,

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
Macros: can you copy macros from one doc to another? Roady Excel Discussion (Misc queries) 1 June 12th 08 05:47 PM
Excel 2007 macros - how to merge 5 macros together into one Sue Excel Discussion (Misc queries) 1 April 16th 08 08:36 PM
Macros warning always shows up, even if all macros removed Joe M Excel Discussion (Misc queries) 1 December 20th 07 04:45 AM
Macros - copying macros from one computer to another TT Excel Discussion (Misc queries) 18 December 14th 06 03:24 AM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM


All times are GMT +1. The time now is 04:34 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"