Programme doesn't work when sent to a different computer - Why?

Wolfy71

New Member
Joined
May 5, 2009
Messages
14
Hi,

I have a programme which works fine on my computer at home but when I send it via email to work the 'sort' function messes up (there is a chance it could be the 'vlookup' function, though) and all the cells in the sort range lose their formula reference - which is of course a tad annoying.

The part of the programme I'm having difficulty with is this:

Range("SsNo1").Resize(d, f).Offset(a, 0).Select
Selection.Sort Key1:=Range("FRSet1"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Looking around on the net, I think the problem may lie with the fact I haven't yet named my project file and this is causing the above not to be recognized on the new computer - but I'm still confused about the steps I should take and what I should be looking for... :confused:

Any ideas about which proverbial tree I should be barking up, here?

Thank you in advance

Adam
 
Last edited:
What formula are you using for the conversion?
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Could you please clarify what you actually have?

Is it one column with 'dates', which contains entries that Excel isn't regarding as dates?

And another where you have a formula converting everything to 'real' dates.

Have you tried the code without the named range(s)?
 
Upvote 0
Here, ($E15) = 22/3/1980

And the formula that errors:

=IF($E15=0,(0),(39904)/365.25-($E15/365.25))

as I'm writing this, I notice that I think '(39904)' should be a cell reference (referring to the column of dates) I've tried changing this but it still doesn't work! Stranger and stranger!
 
Upvote 0
Here, ($E15) = 22/3/1980

And the formula that errors:

=IF($E15=0,(0),(39904)/365.25-($E15/365.25))

as I'm writing this, I notice that I think '(39904)' should be a cell reference (referring to the column of dates) I've tried changing this but it still doesn't work! Stranger and stranger!

What does

=ISNUMBER(E15)

yield? (Entered in any spare cell.)
 
Upvote 0
What is that formula actually meant to do?

Are you trying to count the no of days/years/whatever between 2 dates?
 
Upvote 0
'=ISNUMBER(E15)' equals 'TRUE'

The formula calculates the age of someone given today's date (subtracting their birthday in the first column from today's date in the second) I realize their is probably more efficient way to do this but I haven't find a way to do it yet...

Yes I know what you're thinking: 'The number specified in the formula wasn't the code for today's date.' I've rectified the situation and hopefully this may be part of the problem - though I won't know until tomorrow when I'm back in work.

However, this doesn't completely explain why this column specifying the birthday rather erratically works in some cells and not in others...

Apologies if my explanations have been rather long-winded or had gaping holes in but I'm rather new at the whole game and I hope you can appreciate quite how much I'm learning as I go along.

Thanks for all you are doing.

Regards,
Adam
 
Upvote 0
If you would like to know about the ranges I'm using...

Range("$I$1") contains the code for today's date.

Column A) contains birth dates
Column B) subtracts the column A from today's date, therefore giving the age - This is the column causing the problem.

I'm not using named ranges in these columns as they tend to get tangled.

Hope this helps.
 
Upvote 0
I have a rather humbling and slightly embarrassing confession to make - having spent the last two and a half days wasting everybody's time, I have just find out why my programme was messing up - and it was nothing to do with my coding and a lot more to do with a simple oversight I had made with the computer set-up.

Turns out that my personal laptop is set to Vietnamese regional settings but the computer at work is set to the default American regional settings. If it had been just a simple column of dates, I would probably have spotted this problem quite quickly but being a large field of data obscured it for me - but because I am English I am used to the (more logical) 'day-month-year' way of doing things.

Anyway, it's resolved now and I'm able to move on to pastures new...

Thanks to all of you who scratched your head on this one.

Regards,
Adam
 
Upvote 0

Forum statistics

Threads
1,215,274
Messages
6,123,998
Members
449,137
Latest member
abdahsankhan

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