Avoid circular reference

Markkens

Board Regular
Joined
Mar 4, 2003
Messages
197
I have a series of data points in row 55 of worksheet 'data' I want to reformat:

IF P55 <1 THEN let P55 = '<1' (text)
IF S55 <10 THEN let S55 = '<10' (text)

...and so on.

Can this be done and how would it look in code?

Thanks!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Formulas in row 56 and hide row 55 is one option.

Why does column P have a different cut off than column S? and what is the cut off for the other columns?
 
Upvote 0
The cutoffs and replacement values are all different, I can modify if they're obvious.

The actual range (all on row 3) is: P,S,V,Y,AB,AE,AH,AK,AN,AQ,AT,AW,AZ,BC,BF,BI,BL,BO,BR,BU,BX

Unfortunately 'data' is populated from 2 down, and it's often regenerated with varying quantities of rows, but the sheet is totally clear from CB2 to the far extents.

I can easily add a scratch worksheet for formulas if that helps.
 
Upvote 0
Maybe something like this!!

Code:
Sub Convert()
If [P55] < 1 Then [P55] = "<1"
If [S55] < 10 Then [S55] = "<10"
End Sub

lenze
 
Upvote 0
I had the logic, but not the syntax. Those little []'s were what I needed.

Circular reference is irrelevant since the macro's only firing once :oops:


THANKS!!!
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,292
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top