Question and Answer

For Excel / VBA questions - You ask, Excel Experts will answer

Excel formula

Need a formula

If quantity is 1000 and rate is 260 then amount is 260 because the rate is per 1000.
Please note the rate is per 1000, if i put 2000 in quantity and 260 in rate it should automatically double in amount coloumn.
If i put 3000 in quantity and 260 in rate it should automatically come 3 times of 260 in amount coloumn.

Email Notification When Spreadsheet Is Saved

I created a spreadsheet a few months back. It went from just one person using it, to 3 people. The spreadsheet lives in the network on the people using it asked me to add a feature to it. I looked in the forum for something similar, but couldn't find anything. Maybe my search criteria was off. Anyway...

The ladies who use it would like it to generate an email to the group (3 static email addresses) when saved. I'm not sure the goal, but I said I would look into it. Is something like that possible?
Here is what I got, but it doesn't work. Any assistance would be really awesome.

Is it possible to securely sign off managerial agreement on a spreadsheet?

For auditing purposes it would be helpful for a shared workbook to be ‘signed off’ each month, the manager whom would sign their agreement as no experience of VBA so we have to write it for him but as a group we are just beginners... essentially I wanted to ask your advice on whether this is feasible?
Each month is recorded and balanced in a separate sheet.

So far I just keep coming up with issues but I’m struggling to find ways to solve them:

Create function Color

How would create a function that would call "color" using this code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim A As Integer
Dim B As Integer
Dim C As Integer
A = Range("a1").Value
B = Range("b1").Value
C = Range("c1").Value
Range("D1").Interior.Color = RGB(A, B, C)
End Sub

Calculate absolute time difference between two dates and times while excluding weekends and non-working hours.

Hi,

I’m writing a script for a delivery performance where I want to compare the planned date and time of delivery with the actual delivery date and time.

It gets a bit complicated since I want to exclude weekends and non-working hours (workday is between 0600-22.15) from the result and I want an early delivery to be weighted the same as a late delivery, given that the absolute difference from the planned date and time is the same.

Example

compute and pick values from multiple excel into a master excel

dear all,
ive various excel, with multiple tabs.
i would like to compute a value and put the value in master excel.

can share some lights on how do you this.

many thanks

How do I highlight a group of cells?

HI,

I've created a table and have to make one portion of the table "stand out" (aka I have to add some sort of a glow effect). I did not use the table function on excel, I hard coded all the data. Is there any way I can make a group of cells "Stand out" or glow when compared to the others?

Thanks a bunch!

Using &" "& in formula

I and trying to combine 2 cells using &" "& option in a formla

For example

=Al&" / "&B1

I am trying to make it look like this: 51/36

The first number is entered in so that's not the problem. The 2nd number is from a formula so my combined cell is looking like this: 51/36.0004

How do I get rid of the .0004??

I tried making the cell only 2 characters. I also tried a custom format of 00/00 but nothing seems to work to get my cell to look like 51/36.

Any help I would be grateful.

James

VBA Code needed

Hi,

I have the following code which allows me to randomly choose numbers( as much required ) from a set of data available in column A.

==============================================================

Sub test()
Dim myMax As Long, a, i As Long
myMax = [c2].Value
If myMax < 1 Then Exit Sub
With Cells(1).CurrentRegion.Offset(1)
.Columns("b").ClearContents
a = .Resize(, 2).Value
Randomize:
For i = 1 To UBound(a, 1) - 1
a(i, 2) = Rnd
Next
VSortM a, 1, UBound(a, 1) - 1, 2

Issues with opening new excel book

Hello guys,

I just join your forum as a last resort solution. Well, I am using windows 8 and excel 2010. When I want to compare two excel files open simultaneously in separate windows;( not two files in the same window as "side-by-side" option) my excel just does not allow me to do so. When I open one file and after that another it just opens both files in one same window which can be seen only as side by side and not in e.g. file no1 window and file no2 window. Did I click something or press some key combination?
Thanks a lot

Hyperlink a long URL of more than 255 characters

Hello All,
To get the drilldown feature we need to implement the hyperlink functionality to our excel report. we have tried the function Hyperlink ("URL","Friendly name"), but this functional supports only 255 characters. we have a URL containing 450+ characters. we are using the URL

Grey out Checkbox until selection made in ComboBox on a user form

I have a User form that people must select their name from the drop down list and then select a number of check boxes.
I wanted the Check boxes to remain disabled until a person actually selected their name from the combo box.
The person's preferences are sent to another sheet but some people are sending preferences without their name.
I was given a suggestion of 'CB01.Enabled = False', but could not get it to work.
The combo Box opens with a blank field initially, so that's when I would like the Check Boxes to be greyed out.

Named ranges as data-input for excel charts

Dear all,
I am currently facing the following problem (see attached file):

My excel file is listing some houses and some numbers.
I have defined dynamic named areas for the numbers.
In the cells C7 and D7 I implemented two dropdown menues which can be combined individually and which show all the names of the named areas.
Next to those cells there is a chart which is supposed to take the named areas as data input.

I know that I am able to use a named area as data-input for a chart by using the formula =Table1!Name (generalised).

Hyperlink to list of PDF files in directory and match with Excel entry in Column 1

Hi everyone and I hope you can help me. I have an Excel s/s with entries in column 1 that correspond to the PDF's in a folder - that's the easy part!

The next part I need help with and that is that there are multiple entries in column 1 which correspond to each PDF and they can be 1,2,3,4 or any number of instances that correspond to each PDF.

I would like each column 1 entry to hyperlink to the correctly (same) numbered PDF in the folder.

Now I found the following VB code which creates the hyperlink to each PDF in a folder but I want it to also hyperlink when there are multiple entries of each instance in column 1.

Ideally I would like it to just produce the filename, hyperlinked without the path or any other info.

Thank you in advance and here is the code for hyperlinking to a folder.

How to delete those rows which has same positive & negative value

I am working on a huge data file. There are many rows & columns. I want to delete those rows which has same name and also same positive & negative value and are of same week.

For example

Suresh, +40, 07 JAn(weekend)
Suresh, -40, 07 Jan(weekend)
Suresh, +30, 14 Jan
Suresh, -30, 21 Jan
Suresh, 15, 21 Jan

In above example, I expect it to be like -

Suresh, +30, 14 jan
Suresh, -30, 21 Jan
Suresh, 15, 21 jan

and rest to be deleted automatically.

Suresh, +30, 14 jan & Suresh, -30, 21 Jan should not get delete as they are of different week.

Please guys, help me out!!

Excel Calculate the wrong results

Goodday to you all.
I am currently taking my Navigational Excams and am trying to make a Excal sheet that can do the calculations for me, but for some reason it does it wrong, I get the wrong results, and was wondering what I have done wrong. I have added the sheet to this tread, hope someone can help me. The formular that is calculating wrong is this one

=ACOS((SIN(G12)-SIN(G11)*COS(L20))/(COS(G11)*SIN(L20)))

Best regards
Allan Sørensen

Data mining using dates

I downloaded the historic prices of the S&P and am trying to pick out, monthly prices, and yearly prices. The dates are formatted mm/dd/yyyy except without the zeros.
The cells are a2:a15950 for dates and e2:e15950 for the associated data points. and the new range a5. I tried it on my own and am really at a loss. Thanks!

Need help with a formula =if(A1<=90,A1+90,A1-90)

=if(A1<=90,A1+90,A1-90)

using this formula - 90 +90 =0 and 90-90 = 0 , I want to have the answers = 180 ,
so 90+90 = 180 , and 90-90 = 180 , As I cant use 0 as a figure

Any ideas?

multiple sort combo box

I am new to VBA and having trouble setting up a combo box that sorts based on 4 different column choices. There are 48 columns and a variable number of rows of data beginning on row 17, for which a dynamic range has been created. I need to sort the data in the dynamic range by either column A (Client), Column B (Account Executive), Column C (Dept), or Column D ($ Sales). Columns A, B, and C are alpha characters.

How do I set this up without creating an extra "Sort Order" column on the original data sheet?

Create column chart with multiple values

Hi.
I want to create a simple column chart with multiple values stacked into one "tower".
When I select the first value of let say - 1500 - the chart displays 1500.
If I select a second value of 200 the graph now peaks at 1700.

What I require is that the first value remains at 1500 and the second value reflects 200.

Is this possible?

Thanks.

Renaming and replacing images in a word doc

Hi,
I have a word document with images in it and using microsoft word VBA I want to go through the document, name each image, and move these images to a folder. I have tried inlineobjects, but this does not include each image on my page. The only way I have been able to extract them is by saving the doc as a webpage, but I am not able to delete or rename the images this way.
Please help.

Regarding the VBA

Hi,

Can i use timer for vba forms.

initiating a do until loop

Hello!

I have a large set of data that I want to be extracted into certain phases. And I am trying to write a code to do so. For example the freezing cycle begins when the value in column F hits 1 and G is 18 goes until it F is 10 and G is -35 I am familiar with the do until loop which I have now and that will extract up until F is 10 and G is -15 However, is there a way to set an initial condition (F=1 and G=18)? The code below has it extracting and putting into new sheet. Thank you for your help!!

Dim mycount As Integer
mycount = 0
Dim myrow As Integer
myrow = 1

Need help in selecting a cell after filter

hi experts,

can anyone help me in vba code to select next visible cell below the header.

after filtering i need to select next visible cell below a1(header cell).

thanku

Formula to combine Hlookup with SumProduct

Here is my problem; I have been using the. attached spreadsheet for the past several months. As of late the company has changed the sheet to allow Coaching Recipient comments (row 13. The problem is that not all of the data sheets have this row and it causes an issue with my formula in ap15, which is a SumProduct function. What I am trying to do is find a way to use an HLookup along with the SumProduct function to get the value I need. Ant suggestions would be appreciated.

Thank you in advance

How to extract email lumped in the same column with other data?

How to extract email lumped in the same column with other data?

That is how a cell with combined data looks like:

"1690","test@hotmail.com","898"

Seriously ,Help!

Todor

dynamic updating of hyperlinks between sheets

I am wondering why my hyperlinks breaks between worksheets within the same workbook.

Say I have a worksheet WS1 and I want to create a hyperlink that when I click on the hyperlink, it takes me to a cell on another worksheet (within the same workbook).

So, on WS1, call 1A, I create a hyperlink to a cell 1E on WS2.
This works fine.

Now, I insert a new record on WS2 above row E and my hyperlink no longer takes me to the same row I originally linked it to.
It still takes me to cell 1E, but now that is what was in 1D because it moved down when I inserted a row above 1E.

Show Error Message If Data Is Missing

Hi Excel Experts,

Having a little problem with this reporting process. Basically, there are 3 people that maintain individual excel worksheets to track their deals (all the worksheets have the same columns and layouts). They each send me their sheets on a weekly basis so that I can add to a MASTER sheet and complete reporting.

Carry out task on range of csv files and leave untouched VBA

Hi,

Trying to write a script to carry out a number of tasks but is there code to enable an Excel to look in a particular file for the list of csv files - carry out the tasks and return the appropriate values in the Excel sheet whilst leaving the original csv files untouched?

Thanks in advance for your help.

Sum a dynamic range of cells based on another cells value

Hi,

Trying to sum a range of cells across Excel spreadsheets and using VBA to do it.

The length of the range changes in each cell but the range will always be the same, i.e. using column A - values starting in row 2. Formula in B2 is sum(A2:A3002), B3=sum(A3:A3003) and so on if range was 3000 cells - this can change based on a value entered elsewhere (if this is the easiest way to do it). This formula would continue until the first cell found is blank (i.e. the end of the range).

Syndicate content