Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Make Values from formulas

I have a spreadheet that has a column, titled "Running Totals". This
column moves each month after the first of the month. When I move that
column, I want to automatically convert any formulas to the left of the
column into their numeric value. How? TIA

Greg

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Make Values from formulas

Select all columns to be updated
EditCopy
EditPaste special check Values

HTH
--
AP

"GregR" a écrit dans le message de news:
...
I have a spreadheet that has a column, titled "Running Totals". This
column moves each month after the first of the month. When I move that
column, I want to automatically convert any formulas to the left of the
column into their numeric value. How? TIA

Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Make Values from formulas

this may do it all for you since it copies the last column to the next
column and then converts the formulas in the previous last column to values

Sub valuelastcoltonest()
lc = Cells(1, Columns.Count).End(xlToLeft).Column
Columns(lc).Copy Columns(lc + 1)
Columns(lc).Value = Columns(lc).Value
End Sub


--
Don Guillett
SalesAid Software

"GregR" wrote in message
ups.com...
I have a spreadheet that has a column, titled "Running Totals". This
column moves each month after the first of the month. When I move that
column, I want to automatically convert any formulas to the left of the
column into their numeric value. How? TIA

Greg



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Make Values from formulas


Use "Paste Special" and select "Values". To convert this to VBA, record
it in the Macro Recorder and copy and paste the code produced.


--
MartinShort

Software Tester
------------------------------------------------------------------------
MartinShort's Profile: http://www.excelforum.com/member.php...o&userid=22034
View this thread: http://www.excelforum.com/showthread...hreadid=548633

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Make Values from formulas

try something like this

Sub example()

Dim first As Integer

Worksheets("Sheet3").Activate

Range("A1").Select

first = 1

Do While ActiveCell.Offset(0, first).Value < "Running Totals"
first = first + 1
Loop

Columns(first).Select

Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Application.CutCopyMode = False

Range("A1").Select

End Sub

you would have to run this every month. this assumes that the sheet is
called "sheet3" so you would have to change that appropriately. It also
assumes the heading is in row 1 so if it is not, you have to change the 0 in
Do While ActiveCell.Offset(0, first).Value < "Running Totals" to 1 or 2 or
whatever depending on which row in is in.

hope that helps


"GregR" wrote:

I have a spreadheet that has a column, titled "Running Totals". This
column moves each month after the first of the month. When I move that
column, I want to automatically convert any formulas to the left of the
column into their numeric value. How? TIA

Greg




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Make Values from formulas

Don, the running total column is not the last column. I need something
to find the running total column, count the columns to the left of it,
however omit column "A", and convert any formlas into values. TIA

Greg

Don Guillett wrote:
this may do it all for you since it copies the last column to the next
column and then converts the formulas in the previous last column to values

Sub valuelastcoltonest()
lc = Cells(1, Columns.Count).End(xlToLeft).Column
Columns(lc).Copy Columns(lc + 1)
Columns(lc).Value = Columns(lc).Value
End Sub


--
Don Guillett
SalesAid Software

"GregR" wrote in message
ups.com...
I have a spreadheet that has a column, titled "Running Totals". This
column moves each month after the first of the month. When I move that
column, I want to automatically convert any formulas to the left of the
column into their numeric value. How? TIA

Greg


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Make Values from formulas

Sean, if I wanted to skip Column "A", would I select B1. Your other
assumptions are correct, except it is always the first sheet in the
workbook.

Greg
Sean wrote:
try something like this

Sub example()

Dim first As Integer

Worksheets("Sheet3").Activate

Range("A1").Select

first = 1

Do While ActiveCell.Offset(0, first).Value < "Running Totals"
first = first + 1
Loop

Columns(first).Select

Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Application.CutCopyMode = False

Range("A1").Select

End Sub

you would have to run this every month. this assumes that the sheet is
called "sheet3" so you would have to change that appropriately. It also
assumes the heading is in row 1 so if it is not, you have to change the 0 in
Do While ActiveCell.Offset(0, first).Value < "Running Totals" to 1 or 2 or
whatever depending on which row in is in.

hope that helps


"GregR" wrote:

I have a spreadheet that has a column, titled "Running Totals". This
column moves each month after the first of the month. When I move that
column, I want to automatically convert any formulas to the left of the
column into their numeric value. How? TIA

Greg



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Make Values from formulas

Yes and also change Columns(first).Select to Columns(first + 1).Select.

note also that is only changes the immediate left column. I read in one of
your replies that you wanted to count columns to the left. Does that mean you
want to change all columns to the left except column A?

"GregR" wrote:

Sean, if I wanted to skip Column "A", would I select B1. Your other
assumptions are correct, except it is always the first sheet in the
workbook.

Greg
Sean wrote:
try something like this

Sub example()

Dim first As Integer

Worksheets("Sheet3").Activate

Range("A1").Select

first = 1

Do While ActiveCell.Offset(0, first).Value < "Running Totals"
first = first + 1
Loop

Columns(first).Select

Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Application.CutCopyMode = False

Range("A1").Select

End Sub

you would have to run this every month. this assumes that the sheet is
called "sheet3" so you would have to change that appropriately. It also
assumes the heading is in row 1 so if it is not, you have to change the 0 in
Do While ActiveCell.Offset(0, first).Value < "Running Totals" to 1 or 2 or
whatever depending on which row in is in.

hope that helps


"GregR" wrote:

I have a spreadheet that has a column, titled "Running Totals". This
column moves each month after the first of the month. When I move that
column, I want to automatically convert any formulas to the left of the
column into their numeric value. How? TIA

Greg




  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Make Values from formulas

Sean, yes that's right

Greg
Sean wrote:
Yes and also change Columns(first).Select to Columns(first + 1).Select.

note also that is only changes the immediate left column. I read in one of
your replies that you wanted to count columns to the left. Does that mean you
want to change all columns to the left except column A?

"GregR" wrote:

Sean, if I wanted to skip Column "A", would I select B1. Your other
assumptions are correct, except it is always the first sheet in the
workbook.

Greg
Sean wrote:
try something like this

Sub example()

Dim first As Integer

Worksheets("Sheet3").Activate

Range("A1").Select

first = 1

Do While ActiveCell.Offset(0, first).Value < "Running Totals"
first = first + 1
Loop

Columns(first).Select

Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Application.CutCopyMode = False

Range("A1").Select

End Sub

you would have to run this every month. this assumes that the sheet is
called "sheet3" so you would have to change that appropriately. It also
assumes the heading is in row 1 so if it is not, you have to change the 0 in
Do While ActiveCell.Offset(0, first).Value < "Running Totals" to 1 or 2 or
whatever depending on which row in is in.

hope that helps


"GregR" wrote:

I have a spreadheet that has a column, titled "Running Totals". This
column moves each month after the first of the month. When I move that
column, I want to automatically convert any formulas to the left of the
column into their numeric value. How? TIA

Greg







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
Hiding Formulas and Being Able to Make Changes Karen Excel Discussion (Misc queries) 2 November 23rd 09 04:44 PM
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
How can i make formulas automatic (F9) Tiya Setting up and Configuration of Excel 1 February 20th 06 03:40 PM
Can I make formulas more flexible? George Excel Discussion (Misc queries) 3 November 8th 05 05:38 PM
AdvancedFilter on cells with formulas, returning values and not formulas Claus[_3_] Excel Programming 2 September 7th 05 02:40 PM


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