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!
 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
23,920
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?
 

Markkens

Board Regular
Joined
Mar 4, 2003
Messages
197
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.
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Maybe something like this!!

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

lenze
 

Markkens

Board Regular
Joined
Mar 4, 2003
Messages
197
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!!!
 

Watch MrExcel Video

Forum statistics

Threads
1,123,322
Messages
5,600,951
Members
414,417
Latest member
Nobu

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
Top