Show formulas but not links

jenneki

New member
Joined
Feb 17, 2012
Messages
2
Reaction score
0
Points
0
Hello,

I'm wondering if it is possible to show excel formulas (not the links). For example, say Cell A1 = 100, Cell B1 = 2, Cell C1 = A1*B1, I'd like a code that converts Cell C1 to 100*2.

Any help you can provide will be greatly appreciated. I need this to provide an audit trail for an accounting assignment.

Thanks.
 
this can easily be done by simply changing the values of A and B to text to show in column C.
just put =A1 & "*" & B1
in cell C1 and there you go.
 
Thanks for the quick response seeker. However, I need to do this for over 100 cells and I was looking for something less manual and time consuming.
 
Well it is fairly easy to copy and paste a formula even to 100 rows.
or you can use this macro, provided you don't have any empty rows between data. like
1
2
3

5
6
7

in the above example my code will only work on the first 3 lines, anyway here is the code.


Code:
Sub MyMacro()


'declare row counter
Dim rowCounter As Integer
rowCounter = 1


Do While IsEmpty(ActiveSheet.Range("A" & rowCounter)) = False
ActiveSheet.Range("C" & rowCounter) = ActiveSheet.Range("A" & rowCounter) & "*" & ActiveSheet.Range("B" & rowCounter)
rowCounter = rowCounter + 1
Loop


End Sub

Hope it helps you,

Simi
 
Back
Top