Calculating Full-width Half-max (fwhm)
calculate the full-width half-max of a peak in data? My chart (gray value vs. pixels) essentially looks like a letter M. What I've tried is finding the max of each peak, dividing that by two, and then using vlookup to find the corresponding pixel values on each side of the peak. But, since vlookup does not work for descending values, I cannot find the half-max value on the right side of each peak.
View Complete Thread with Replies
Related Forum Messages:
Vlookup Only Working Half Way Down Spreadsheet?
I have a spreadsheet with members details in and I've added a few columns showing:
Col Q: Paid 2008 (blank if No, 1 if Yes)
Col R: Show Paid Yes or No (shows a Yes or a No)
Col S: Date Joined (only entered if new and joined during 2008)
Col Z: Subs owing from 2008 (if existing members and owe last yr's subs)
Col AA: Subs to Pay in 2009 (a standard £35 or pro rata if joined during 2008)
Col AB: Pro Rata (if they joined other than at the beginning of 2008)
Col AC: EA Sub? (based on a yes/no column, to add £5 if yes)
Col AD: Total to Pay for 2009
So the formulae (or data entered) for the above columns are as follows:
Col Q: Paid 2008 - blank if no, 1 if Yes
Col R: Show Paid Yes or No - =IF(Q2=1,"Yes","No")
Col S: Date Joined - a date entered in format d/m/yy
Col Z: Subs owing from 2008 - =IF(R2="no", 35,0)....I want a default 35 in here
Col AA: Subs to Pay in 2009 - =IF(S2="",35,"Pro Rata")....says that if there is no date which indicates they are an existing member, they will pay the standard 35, otherwise they'll be paying a pro rata fee...................
It all works fine until a certain row (27 actually) - then I get a VALUE! error which points to the Date Joined field. Now I've tested that value against the vlookup table and it returns the correct data, so why doesn't it do it in my spreadsheet????? I've tried changing the formats on the cells; clearing all data; entering a different date, but from that row in the spreadsheet down to the last row, it simply won't work! I've looked at each formula in each cell on the rows where it is working and the rows where it isn't and I can't see anything different.
What else can I look for? It is SO frustrating as it does what I need it to to do but only for a third of the spreadsheet!!!!
Half Of Chart Column Is Not Visible
I have created a combination chart comprising a column and a line. The columns to the extreme right and left are half visible (I can only see half of the column).
Look at my two attachments to see what i mean.
Excel File: http://www.MegaShare.com/235337
Note: I have cross-posted this thread in excelforum.com: http://www.excelforum.com/showthread.php?t=608124
Macro To Format Half Of The Cell With A Different Color
I have a list of records that will eventually be used to create a pivot table. Sometimes an account number will be listed twice but instead of adding to the previous info, it needs to start a new record. I decided in these instances to mark the account number with a character (+). Even though the + will designate a separate record, I'd like it to be invisible.
Is there a way to automatically turn the font color white for only the +? Since I've automated the rest of the process using a macro, a VBA solution is fine.
Fixed Width With CONCATENATE
I want to CONCATENATE 3 columns
column 1 will have names
Columns 2 and 3 will have numbers
All will be of different lengths
Is there any way to set a fixed width when I use the CONCATENATE funstion so everything looks more uniform (left justified)
Relationship Between Width And Pixels
Got two spreadsheets that should be identical, and in both the column widths ARE identical - when you look at the no. of Pixels. However, the other width is different. So what's the relationship between width and pixels? Is this difference to be expected?
Set Height And Width Of Cells
I am in desperate need of a macros that sets the heights and widths of columns and rows on a list of provided spreadsheets.
On each of these sheets:
MySheets = Array("FY09 Installation Support", "FY09 Install", "FY09 Purchase", _
"FY09 CF Discretionary Grants", "FY09 CF LOI", "FY08 Purchase", _
"FY08 Installation Support", "FY08 CF Discretionary Grants", _
"FY07 Sup Install Support", "FY07 CF Install Non-LOI", "FY07 Sup Purchase", _
"FY05 CF Carryover Install", "FY04 Recovery Funds", "FY05 Recovery Funds", _
"FY08 Safety Carryover", "FY09 Safety", "FY09 Transport Canada")
I need to set the height of all the rows to 18.00. I need to set the width of all of the columns to 12.00, except for columns A, C, and T, which need to be at a width of 28.00.
Fixed Column Width
I'm trying to create a vb to get all columns on my sheet to have a fixed width.
If I run my sub all columns go back to the set width. But I want the width to reset when the width is changed.
Histogram Bin Width Calculation
I am looking for an formula to calculate the bin width for a histogram chart.
I am thinking of creating 50 bins for the chart. The range (max - min) of the data can be from £10 to £5,000,000.
A straighforward formula will be (max - min)/ 50. But I don't want decimal point in the bin numbers.
I am thinking of using Floor/Ceiling function, to round the bin-width to whole numbers, but 10/50, 100/50, 1000/50,..., 1000000/50 all need to round up/down to different scales! for example, I want 100/50 round to 5, 1000/50 round to 50 etc.....I was wondering is there a formula I can use to calculate the bin-width based on the criteria above or similar?
Copying Column Width From Another Sheet
I have an Excel file where there are multiple people's information on one sheet, and I have to split them out into multiple sheets. So I have written a loop to successfully do that.
However, I need all the sheets to have the same column widths as the original sheet. So after I insert a new sheet and cut and paste the appropriate data, I call another Sub Procedure from my main Procedure to do this. That Sub Procedure looks like this:
' Copy the column width for the first 30 columns
Dim i As Integer
For i = 1 To 30
ColumnS(i).ColumnWidth = Sheets("Sheet1").ColumnS(i).Width
However, I am not getting the results I expect. The column widths change, but are not the right sizes, and I have no idea why.
One odd thing I have notice, is that is mind code, whenever I type in:
VBA automatically changes it to
I have no idea why. I have no code or variables named "ColumnS". I am not sure if this is somehow playing into my problems...
BTW, I am using Excel 2007.
Picture Width And Height Adjustment
I need to paste a picture from the Clipboard to my Worksheet. I select the origin and paste it with the macro.
I need to adjust that picture to fit in a defined space from left corner of Range($J$10) to the right corner of
Actually, i'm using this procedure
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 358.25
Selection.ShapeRange.Width = 725.
The problem with it is, the Height and Width is arbitrary to the size of the cells at the moment. I would like to had a procedure to calculate does value. They represent the distance between the defined cells location for the image. Actually, if cells width or height change, the picture is misplaced.
Isolate The Width And Length Of Column
I have the following type information in thousands of cells. I need too isolate the Width and Length from these cells. The width and the length are the two numbers on each side of the "X".
RAPITONE C2 10 X 10 100
RAPITONE M2 10 X 10 250
RAPITONE M2 10 X 10 250
RAPITONE M2 10 X 10 250
RAPITONE M2 10 X 10 250
RAPITONE M2 10 X 10 250
RAPITONE M2 10 X 10 250
RAPITONE M2 76 EI 42 X 100 ROLL
Set Height & Width UserForm Controls
I'm using a UserForm.Label to display comments which are of variable length. At the bottom of the UserForm are two CommandButtons. I'd like the gap between the Label text and the CommandButtons to be small (and preferably constant); and the CommandButtons to be at the bottom of the UserForm. This means setting the CommandButton.Top and UserForm.Height as a function of the Label.Height. The crude way I have so far achieved is to use Len(Label.Caption) as the surrogate for Label.Height but it's not very satisfactory due to word-wrap and blank lines.
Calculate Text Width In Points
Is there a way in Excel/VBA to calculate the width of a text string (in points or inches) with a specific font/font size/font attributes? Right now I have to use a static character count which assumes worst- case character widths for the font (Arial 8 point) but leaves unused whitespace to the right when the text string uses narrow characters.
For/Next To Change .Left & .Width Parameters
Is it possible to change the Left and Width parameters of a group of TextBoxes in a For/Next loop, when the only common factor is the amount of change? The TextBoxes ar of different widths and locations. The common factor is a small TextBox the left of each TextBox which is what I am hiding under certain conditions. When hidden I need to move the TextBoxes over to where the hidden TextBox was and then enlarge the TextBox by the widt of the heddin TextBox (When the condition changes, I will resore the orginal positions and sizes).
vba did not like this bit of code in a For/Next loop:
Me.Controls("TB" & i).Left.Value = Me.Controls("TB" & i).Left.Value - 24
Me.Controls("TB" & i).Width.Value = Me.Controls("TB" & i).Width.Value + 24
Finding Max Column Width Without A Loop?
I have a range of cells which I wish to print to a .txt document. However, I would like these cells to stay aligned, one on top of the other. I am currently doing that by finding the cell with the widest piece of data for each column, and storing the width that each column needs to be to an array of integers. Then, when printing out the range, I simply add spaces to each piece of data its width is the same as the max column width. I am finding the max column width using the following loop:
'find the width for each column and store in col_width()
For cur_col = 1 To total_cols
'skip the tag switches column
If cur_col <> 3 Then
max_data_width = 0
For cur_row = 1 To total_rows
cell_data_width = Len(Find_String_Diagnostics(diagnostic_range.Cells(cur_row, cur_col)))
If cell_data_width > max_data_width Then.................
Increase Width Of Data Validation List
I having been looking at ways of increasing the width of a data validation list (drop-down) to accommodate items longer than the width of the target column. I found a solution here http://puremis.net/excel/code/068.shtml
The demonstration seems to do exactly what I require. However the code supplied does not work for some reason. I have run the code in debug to see what it is doing and the code runs until it gets to the line
Set objDic = CreateObject("Scripting.Dictionary")
from here it just jumps to the end of the procedure. Mousing over objDic says ObjDic = Nothing.
I am getting a bit out of my depth here - anyone know why objDic is not being assigned a value and the procedure bombing out from here.
Change Column Width And Height In Millimeters Mm
I have vba code to change column width and height into mm.
The code is taking alot of time to run and then hangs my excel session.
The code below calls two sub routines.
Dim i As Long
.DisplayAlerts = False
. ScreenUpdating = False
For i = 1 To 23
SetColumnWidthMM i, 3.5
Userform & Controls Scroll Height Width
I have a userform which has vertical and horizontal scroll bars. I want to set the scroll bar width and height properties to the correct value, regardless of the size of monitor screen used to look at the user form. I'm thought of using the code below in the initiliaze event for the user form:
Me.ScrollHeight = Me.Height
Me.ScrollWidth = Me.Width
However, this does not seem to work. I've tried adding 250 (Me.Height + 250)to each measurement, which works, but gives the user with the larger screen a very big scroll area. I wondered if there was a formula based on the application height, that would allow the scroll height to be perfect for the user form regardless of screen size?
PS. I also use the following code to set the user form height on initialize. I don't know if that effects anything.
Me.Height = Application.Height
Me.Width = Application.Width
Import Fixed Width Text File
I am having a problem importing fixed width text files with VBA. I created a user form for a dept to import a number of reports we get as text files into Excel. I imported each line into 1 cell (Column A) in Excel and then used mid functions to split out the columns. Everything works fine on my PC. However, when I use other PCs to import the same files (either off the same shared drive or the PC hard drive) the columns are not splitting in the correct places. Does anybody know what could cause this. Since the columns are splitting based off a fixed number of characters, I'm assuming Excel is somehow distorting a character count while opening the text file. I did notice that if I try to import text files saved on one of our shared drives, they do not import correctly on my PC either. However, if I copy and save the same text file to any of the other shared drives or my PC, it imports with no problems.
Determine Column Width Pixels / Characters
I looked at a couple pages of Ozgrid solutions for people that were having word wrap issues and decided my issue wasnt related to any of them - my cells are not merged and they are not exceeding 1024 characters. I have a sales sheet with column headings as the name of the product, many of which have long names (but all less than 100 characters). For example, one cell value is "Flow Meters And Regulators 2007" and another is "Sphygmomanometers 2007".
My column width pre-format is 8.43 and after format is 7.86
The only code I use to adjust the row and column size is
.WrapText = True
As you can imagine "Sphygmomanometers" breaks into two lines in the short confines of 7.86 width. How can i get the column autofit to adjust to the full word?
Change Chart Height & Width Code
How do I write a short piece of code that defines the specific height and width that I want to assign to an existing chart. The code will be added to existing code that I have that formats the chart in other ways. This needs to be able to work with any active chart selected, not a specific named chart.
Determine Total Column Width Of Visible Cells
I am trying to resize a picture on a worksheet to fit a dynamic measurement(the size of the page is different depending on the contents in cells).
I am doing this all in VBA.
so what I have come up with is that I need to
1) determine the total column width of only the non-hidden(visible) cells.
2) resize my picture to those measurements, so I can get an exact fit, and it doesn't create a new page break, by going over.
I have found some code on forums, and am thinking of something like this as a solution(although I don't know how to complete it):
For summing column widths:
Speed Up Macro That Adjusts Row Height & Column Width
This used to (and on some machines still does) work very well, but all of the sudden on my work machine, it is incredably SLOW!! The whole program takes a list of tasks and dates, and creates a wall calendar from them. Then (the offending part, below in code) looks at each cell on the wall calendar and formats it by sizing the height of a merged cell so that the entire task is displayed, then goes on to put a square around it (works fine).
The formating of the cell height/width can take up to 11 SECONDS each cell. What is happening to do this? Again, it USED to, and on some machines still does, FLY through this process. But now it just crawls. Code below, with the 3 offending lines identified.
Private Sub Fit_Height(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range
Application. ScreenUpdating = False
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
An additional item (clue?) is that, after the macro is done running, it is still unbearably slow to do anything on-screen. Grabbing the column header and changing the column width takes 5 seconds or so before it snaps to the desired width and displays correctly. Closing Excel and reopening it takes care of that problem.
More advancement (as I wait). It seems to be the Application.PageSetup that kills it. As soon as I hit the first Application.PageSetup line, the app grinds to a halt, and almost every line after that that manipulates the screen format or the page format takes 5 or so seconds EACH to process. I put them all at the end, but that really doesn't solve the problem, nor explain it, nor give me a true solution.
Manipulate Chart Data Labels Height, Width....
I m working with bar charts and as I've heard these labels can be a bit of a pain. I've got the labels in roughly the right position 90% of the time however that other 10% has me in rolling fits.
1. A label within the chart area is wrapped on two lines, how could I restrict Excel from wrappign the label
2. A Labels position covers some of the data reported and thus makes the graph messy
how could I find the position of the end of the bar and also the length of the datalabel so I could reposition it. Note I am using 2003 and that I am trying to use
for finding the position although this is only really where im getting to. finding the wrapping position and also being able to manipulate the length of the label is proving tricky.
Fix Textbox Width And Automatically Adjust Height To Text
how to automatically set a text box size to display text contained by right-clicking the textbox and put a check in the auto-size box under "Alignment".
However I would like to set the widht of the text box and automatically adjust the height according to the number of lines of text. Is this possible by VBA code or othe means?
Restricting Width Of Data Validation Drop Down List?
I have not found a way to control the width of a validation drop down menu. I have 3 drop down list. Two of them are in wide column cells and one a narrow column cell. For some reason my narrow column cell gives me a wide pull down even though the length of the data in this field is only 3 to four characters.
Return Full Row
I would like to enable my user to search on any one of about 4 columns, when the result(s) are found I need to return the full row to a result form. I've had no problems getting the information from the form to the worksheet but I've run into a few problems now. I should be able to be able to return the rest of the row with the result if I can determine a way to return the row number. Anyway these are the things that I need (in a nut shell):
1. Return a row number
2. Pass values to a form who should be able to change according to the size of the array
3. Have an array of variable size, with variable headers.
Separate A Full Name
I have found these three different ways to separate a full name in say column A row 1. But when i insert different cells into the equation i get lossed. What is the proper way to separate a collection of full names into first middle and last. Do you highlight the list and put in one general equation or do you have to repeat these steps for each individual name in each cell?
=IF(ISERROR(SEARCH(" ", RIGHT(A1, LEN(A1) - _SEARCH(" ", A1, 1)), 1)) = TRUE, "", _LEFT(RIGHT(A1,LEN(A1) - SEARCH(" ", A1, 1)), _SEARCH(" ", RIGHT(A1, LEN(A1) - SEARCH(" ", _A1, 1)), 1) - 1))
Replaces The Full Date
This formula looks at a cell and replaces the full date with jst the month
and the year....but some cells are blank, in this case this formula sends
I need to add something to this formula that when the cell is
blank...instead of putting "100" as it does now, I need it to put
Like "If 100, then "Unsdchedule"
Full Screen Crosshair
This is a simple fine line crosshair which ALWAYS extends the full screen width and height. Excel users seem to be stuck with the little box cross. A full screen crosshair for Excel would allow one to instantly and easily see which row and column the cursor is on without clicking a cell or following from the cursor to the row/column with your finger on the screen. It may seem trivial, but once you have used a full screen crosshair, you just don't know what you've been missing.
Calculate The Full WC Date From YY-WW?
I have weeks in format YY-WW (this week is 09-18) and wish to calculate the full date for the week commencing day for that week. '09-18 is in cell S8. To work out the date I currently have: =DATE(LEFT(S8,2),1,RIGHT(S8,2)*7-8)-WEEKDAY(DATE(LEFT(S8,2),1,3))
Which I thought was working fine, but turns out to be the WC date for 1909. I'll probably have to change the -8, that's not a problem, but I can't work out how to get it to 2009.
Inserting Users Full Name
I am creating a userform and would like to be able to automatically enter the name of the person using it. The way our network is set up is Username = 1st 5 letters of surname + 1st 2 letters of forename. Due to this i cannot use
Function UserNameWindows() As String
UserName = Environ("USERNAME")
as this returns the login name as opposed to the full name. I also cannot use
Function UserNameOffice() As String
UserNameOffice = Application.UserName
due to the fact that the office settings are defaulted to "Any Authorised User" unless manually updated by the user.
The users full name is displayed at the top of the start menu, but I have so far not been able to find a way to pull that into my form.
Text To Columns Macro (fixed Width) With Predefined Format On Result
I need to fixed width-text to column macro and found a reply in the forum.
However, when I apply the macro, the result of zeros in front of figures disappear since the format of value in splitted column doesn't predefined as text
e.g. sample text to split to column:
when running below macro; result shows:
(Beginning zeros figures of the first and last column disappear)
Number Of Full Months Between Dates
I want to calculate leave on the basis of Date of joining (DOJ). Rule is:
If DOJ is not he first day of the month, then no leave is earned for that month. Suppose DOJ is 26/12/2006, for Dec.2006 no leave is earned. One leave will be earned in January 2007 & subsequent months.
But if DOJ is 01/12/2006, then one leave will be earned in Dec.2006 & subsequent months also.
A zip file containg two excel files is attached for ready reference.
Stuck In Full Screen Mode
I seem to be stuck in "Full Screen" mode. When I go to the View menu, both "Full Screen" and "Normal" are highlighted. I can't seem to get out of Full Screen.
I am using Excel 2003, XP SP3 installed. This just started this am. I did download and install Microsoft patches this am. ???
I am able to save and use Excel but without normal view my formating buttons etc. are not available.